New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update combats.txt #1157
Update combats.txt #1157
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1157 +/- ##
============================================
- Coverage 30.73% 30.73% -0.01%
+ Complexity 15074 15073 -1
============================================
Files 1038 1038
Lines 161506 161506
Branches 35088 35088
============================================
- Hits 49639 49633 -6
- Misses 103012 103016 +4
- Partials 8855 8857 +2
Continue to review full report at Codecov.
|
Checking case insensitivity for $location ==> expected: <Returned: true> but was: <Invalid adventure area: "The Barrel Full of Barrels" |
I can't reproduce when running tests normally, although I can with $ ./gradlew test --tests=CustomScriptTest.enumeratedTypesAreCaseInsensitive This points to your specific tendency of running the tests with The message you report is from a method of AdventureDatabase that's only invoked from a static block. Thus, in the "typical" scenario, this error message is most likely printed out (and ignored) in the first test case that causes AdventureDatabase.class to be loaded. |
I'm going to politely disagree if only because I am not running with fork=1. I did so when there was test leakage that we were trying to plug, but since it increases the wall clock run time of testing on my system by a factor of 3 or more I no longer do it casually. |
Because I have been known to make mistakes... Updated to 26827 Ran gradlew jacocotestreport `Microsoft Windows [Version 10.0.19044.2006] C:\KoLmafia>gradlew jacocotestreport
CustomScriptTest > enumeratedTypesAreCaseInsensitive() FAILED 3675 tests completed, 1 failed, 31 skipped
FAILURE: Build failed with an exception.
BUILD FAILED in 3m 52s C:\KoLmafia>` |
I did shadowjar, clean and then jacocotestreport and this time the test passed locally. Trying to rerun immediately does nothing. |
My recollection is that there is a secondary effect at play where Gradle's JUnit test runner will run failing tests at the start of an execution, which will exacerbate this particular failure mode. (I can't find documentation of this, offhand.) IMO the problem is that the test case is fragile, as it depends on the output matching exactly, up to any side effects such as informational log messages. One possible alternative would be to move this into textui/parsetree/DataTypesTest.java and instead check that assertEquals(
DataTypes.parseValue(type, firstValue.toUpperCase(), true),
DataTypes.parseValue(type, firstValue.toLowerCase(), true)); |
See https://kolmafia.us/threads/invalid-adventure-area-the-barrel-full-of-barrels.28134/
My local tests now fail enumeratedTypesAreCaseInsensitive() apparently because the barrels are no longer valid as an enumerated type.
I'm not sure this is the right fix and it certainly is not a data file integrity test for combats.txt but since AFAIK the same test fails locally for me but not in the GitHub workflow it undermines my trust in the workflow.