Loading... (original) (raw)

Tests:
- jdk/jshell/ClassesTest.java
- jdk/jshell/GetResourceTest.java
- jdk/jshell/ForwardReferenceTest.java

Typical failure mode is:

java.lang.AssertionError: Expected no signature-change, got: signature-change
expected-event: STEInfo key: MAIN_SNIPPET before: VALID status: VALID sig: false cause: null
got-event: key: 3 before: VALID status: VALID sig: true cause: null expected [false] but found [true]

This occurs when a test involves nested types. As jshell tries to use class redefinition when possible, it will hit errors if trying to redefine classes in a way that would modify the NestHost or NestMembers attributes. It then falls back to an alternative technique. For the tests this results in a "signature-change" that is unexpected.

The simple fix is to change the "expects signature-change parameter" from false to true for those test cases.