Split and Organize Checkstyle inputs by Test for SingleSpaceSeparator #4080

Closed
sabaka opened this Issue Mar 22, 2017 · 12 comments

Comments

Projects
None yet
4 participants
@sabaka
Contributor

sabaka commented Mar 22, 2017

subtask of #3891 .

do a copy of all test input files to separate folder for SingleSpaceSeparator .
Not any other Check should use new inputs.

@sabaka

This comment has been minimized.

Show comment
Hide comment
@wate123

This comment has been minimized.

Show comment
Hide comment
@wate123

wate123 Mar 22, 2017

Contributor

I'm on it

Contributor

wate123 commented Mar 22, 2017

I'm on it

@wate123

This comment has been minimized.

Show comment
Hide comment
@wate123

wate123 Mar 23, 2017

Contributor

can you give me some hint? please @sabaka

Contributor

wate123 commented Mar 23, 2017

can you give me some hint? please @sabaka

@wate123

This comment has been minimized.

Show comment
Hide comment
@wate123

wate123 Mar 23, 2017

Contributor

After I run the mvn clean verify. It give me an error

Tests run: 2001, Failures: 4, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:14 min
[INFO] Finished at: 2017-03-23T11:13:12-05:00
[INFO] Final Memory: 44M/599M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project checkstyle: There are test failures.
[ERROR]
[ERROR] Please refer to /home/jun/git/checkstyle/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Please help me out.

Contributor

wate123 commented Mar 23, 2017

After I run the mvn clean verify. It give me an error

Tests run: 2001, Failures: 4, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:14 min
[INFO] Finished at: 2017-03-23T11:13:12-05:00
[INFO] Final Memory: 44M/599M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project checkstyle: There are test failures.
[ERROR]
[ERROR] Please refer to /home/jun/git/checkstyle/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Please help me out.

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Mar 23, 2017

Member

Failures: 4

@wate123 You must look above for list of tests that fail. There are 4 of them.
JUnits must pass.

Member

rnveach commented Mar 23, 2017

Failures: 4

@wate123 You must look above for list of tests that fail. There are 4 of them.
JUnits must pass.

@wate123

This comment has been minimized.

Show comment
Hide comment
@wate123

wate123 Mar 23, 2017

Contributor

`Results :

Failed tests:
SingleSpaceSeparatorCheckTest.testNoSpaceErrors:45->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:261 unexpected output: /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterNoErrors.java:0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterNoErrors.java (No such file or directory) expected:<0> but was:<1>
SingleSpaceSeparatorCheckTest.testSpaceErrors:88->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 0 expected:<...aceAfterErrors.java:[11:3: Use a single space to separate non-whitespace characters.]> but was:<...aceAfterErrors.java:[0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterErrors.java (No such file or directory)]>
SingleSpaceSeparatorCheckTest.testSpaceErrorsAroundComments:104->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 0 expected:<...eAfterComments.java:[13:13: Use a single space to separate non-whitespace characters.]> but was:<...eAfterComments.java:[0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterComments.java (No such file or directory)]>
SingleSpaceSeparatorCheckTest.testSpaceErrorsIfCommentsIgnored:114->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 0 expected:<...eAfterComments.java:[13:13: Use a single space to separate non-whitespace characters.]> but was:<...eAfterComments.java:[0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterComments.java (No such file or directory)]>
Tests in error:
CommitValidationTest.setUp:101->getCommitsToCheck:183 » IllegalArgument One of...

Tests run: 2001, Failures: 4, Errors: 1, Skipped: 0`

I don't understand why there is no such file or directory?

Contributor

wate123 commented Mar 23, 2017

`Results :

Failed tests:
SingleSpaceSeparatorCheckTest.testNoSpaceErrors:45->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:261 unexpected output: /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterNoErrors.java:0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterNoErrors.java (No such file or directory) expected:<0> but was:<1>
SingleSpaceSeparatorCheckTest.testSpaceErrors:88->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 0 expected:<...aceAfterErrors.java:[11:3: Use a single space to separate non-whitespace characters.]> but was:<...aceAfterErrors.java:[0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterErrors.java (No such file or directory)]>
SingleSpaceSeparatorCheckTest.testSpaceErrorsAroundComments:104->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 0 expected:<...eAfterComments.java:[13:13: Use a single space to separate non-whitespace characters.]> but was:<...eAfterComments.java:[0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterComments.java (No such file or directory)]>
SingleSpaceSeparatorCheckTest.testSpaceErrorsIfCommentsIgnored:114->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 0 expected:<...eAfterComments.java:[13:13: Use a single space to separate non-whitespace characters.]> but was:<...eAfterComments.java:[0: Got an exception - /home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterComments.java (No such file or directory)]>
Tests in error:
CommitValidationTest.setUp:101->getCommitsToCheck:183 » IllegalArgument One of...

Tests run: 2001, Failures: 4, Errors: 1, Skipped: 0`

I don't understand why there is no such file or directory?

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Mar 23, 2017

Member

/home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterComments.java

Carefully look at directory structure and confirm file is in that location. Tests don't lie.

Member

rnveach commented Mar 23, 2017

/home/jun/Downloads/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/whitespace/singlespaceseparator/InputSingleSpaceAfterComments.java

Carefully look at directory structure and confirm file is in that location. Tests don't lie.

@wate123

This comment has been minimized.

Show comment
Hide comment
@wate123

wate123 Mar 23, 2017

Contributor

Thanks for your help! I have a last fail test right now
Failed tests:
SingleSpaceSeparatorCheckTest.testSpaceErrors:88->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 28 expected:<...AfterErrors.java:6:4[2]: Use a single space...> but was:<...AfterErrors.java:6:4[7]: Use a single space...>

Tests run: 2001, Failures: 1, Errors: 0, Skipped: 0

can you explain the error to me? Thanks

Contributor

wate123 commented Mar 23, 2017

Thanks for your help! I have a last fail test right now
Failed tests:
SingleSpaceSeparatorCheckTest.testSpaceErrors:88->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 28 expected:<...AfterErrors.java:6:4[2]: Use a single space...> but was:<...AfterErrors.java:6:4[7]: Use a single space...>

Tests run: 2001, Failures: 1, Errors: 0, Skipped: 0

can you explain the error to me? Thanks

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Mar 23, 2017

Member

expected:<...AfterErrors.java:6:4[2]: Use a single space...> but was:<...AfterErrors.java:6:4[7]: Use a single space...>'

You should become more familar with Junit and how it works.
This is saying the violation column number changed. Inputs should nearly be an exact copy of the original, so violations shouldn't change. Input must have been changed somehow.

Member

rnveach commented Mar 23, 2017

expected:<...AfterErrors.java:6:4[2]: Use a single space...> but was:<...AfterErrors.java:6:4[7]: Use a single space...>'

You should become more familar with Junit and how it works.
This is saying the violation column number changed. Inputs should nearly be an exact copy of the original, so violations shouldn't change. Input must have been changed somehow.

@rnveach rnveach added the approved label Mar 24, 2017

@wate123

This comment has been minimized.

Show comment
Hide comment
@wate123

wate123 Mar 24, 2017

Contributor

not sure why, but Every time I modify the InputSingleSpaceErrors file will give the error

SingleSpaceSeparatorCheckTest.testSpaceErrors:88->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 28 expected:<...aratorErrors.java:6:[42]: Use a single space...> but was:<...aratorErrors.java:6:[51]: Use a single space...>
I stuck on this for few hours.....

Contributor

wate123 commented Mar 24, 2017

not sure why, but Every time I modify the InputSingleSpaceErrors file will give the error

SingleSpaceSeparatorCheckTest.testSpaceErrors:88->BaseCheckTestSupport.verify:191->BaseCheckTestSupport.verify:227->BaseCheckTestSupport.verify:258 error message 28 expected:<...aratorErrors.java:6:[42]: Use a single space...> but was:<...aratorErrors.java:6:[51]: Use a single space...>
I stuck on this for few hours.....

@rnveach

This comment has been minimized.

Show comment
Hide comment
@rnveach

rnveach Mar 24, 2017

Member

@wate123 Please verify your changes in git history for the file.
I can't see what is wrong until you push changes to PR.

Member

rnveach commented Mar 24, 2017

@wate123 Please verify your changes in git history for the file.
I can't see what is wrong until you push changes to PR.

@romani

This comment has been minimized.

Show comment
Hide comment
@romani

romani Apr 25, 2017

Member

fix is merged

Member

romani commented Apr 25, 2017

fix is merged

@romani romani closed this Apr 25, 2017

timurt added a commit to timurt/checkstyle that referenced this issue May 6, 2017

timurt added a commit to timurt/checkstyle that referenced this issue May 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment