Repository navigation
Fix UI test failures in clean install build - #173
Merged
Merged
Conversation
mvnw clean install failed in brailleblaster-core with two test failures once the six-key table editor test was added. TableEditorSixKeyTest typed into the cell with SWTBot typeText, which posts OS-level keystrokes. Those go to whichever window has OS focus, so on Windows builds the cell stayed empty. The test now sends key down/up events straight to the cell widget, which still exercises the StyledText and SixKeyHandler code paths. SettingsChangeTest then failed with "Invalid thread access" because WPManager.display was created once in a static initializer, while BBTestInit disposes the display after every passing test. The next UI test built its shell on the disposed display. WPManager.display is now a getter that creates a new display if the previous one was disposed. The application only disposes the display at exit, so runtime behaviour is unchanged. Java callers use WPManager.getDisplay().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
mvnw clean installfails inbrailleblaster-corewith two testfailures since the six-key table editor test (#169) was added:
TableEditorSixKeyTest.sixKeyMenuAndCellInputTrackSharedMode:expected [f] but found []SettingsChangeTest.changePageSettingsTest:SWTException: Invalid thread accessCauses and fixes
TableEditorSixKeyTest. SWTBot
typeTextposts OS-levelkeystrokes, which go to whichever window has OS focus. On Windows
builds that is not the test shell, so the cell stays empty. The test
now sends key down/up events directly to the cell widget, which still
runs the real StyledText and
SixKeyHandlercode.SettingsChangeTest.
WPManager.displaywas created once in astatic initializer, but
BBTestInit.cleanupBB()disposes the displayafter every passing test. The next UI test in the same JVM created its
shell on the disposed display. This was hidden while
SettingsChangeTestwas the only enabled UI test.WPManager.displayis now a getter that creates a new display if theprevious one was disposed. The app only disposes the display at exit,
so runtime behaviour is unchanged. The Java caller
(
CorrectTranslationDialog) usesWPManager.getDisplay().Testing
mvnw clean installon Windows: BUILD SUCCESS, all modules,0 failures (brailleblaster-core: 128 tests).