Skip to content

Ensure that tests compile as-is before stripping annotations - #408

Merged
jtigger merged 2 commits into
masterfrom
389-catch-missing-ignore-imports
Apr 4, 2017
Merged

jtigger merged 2 commits into
masterfrom
389-catch-missing-ignore-imports

Conversation

@stkent

@stkent stkent commented Apr 2, 2017

Copy link
Copy Markdown
Contributor

Fixes #389.

@stkent
stkent requested a review from jtigger April 2, 2017 01:09
@stkent

stkent commented Apr 2, 2017

Copy link
Copy Markdown
Contributor Author

I think that build failure uncovered a broken test suite! Fixing tomorrow :)

@stkent

stkent commented Apr 2, 2017

Copy link
Copy Markdown
Contributor Author

Just to confirm, when we manually remove the @Ignore annotations, the compileTestJava is re-run (not skipped) when executing the test task. This means if our manual annotation stripping were to ever change and "break" a class somehow (e.g. we accidentally removed the end of the import statement), the build should fail.

++find . -name '*Test.java'
+for testfile in '`find . -name "*Test.java"`'
+sed s/@Ignore// ./src/test/java/CustomSetTest.java
+mv /tmp/journey-test.sh-unignore_all_tests.txt ./src/test/java/CustomSetTest.java
+gradle test
:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:compileTestJavaNote: /home/travis/build/exercism/xjava/build/exercism/java/custom-set/src/test/java/CustomSetTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details. // note: not marked as up to date!
:processTestResources UP-TO-DATE
:testClasses
:test

@jtigger jtigger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. :)

@jtigger
jtigger merged commit 2110550 into master Apr 4, 2017
@jtigger

jtigger commented Apr 4, 2017

Copy link
Copy Markdown
Contributor

Thanks for tackling this one, @stkent! Thorough and inexpensive.

@stkent
stkent deleted the 389-catch-missing-ignore-imports branch April 5, 2017 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants