Skip to content
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

testDCOM_BDFG (org.eclipse.cdt.ui.tests.text.doctools.DocCommentHighlightingTest) flaky #259

Closed
jonahgraham opened this issue Jan 26, 2023 · 3 comments · Fixed by #268
Closed
Labels
flakytests Tracking known flaky tests releng Release engineering and project management

Comments

@jonahgraham
Copy link
Member

The flaky test:

testDCOM_BDFG (org.eclipse.cdt.ui.tests.text.doctools.DocCommentHighlightingTest)

with this output;

expected:<[offset: 149, length: 17, offset: 184, length: 18, offset: 223, length: 16, offset: 241, length: 17, offset: 258, length: 16, offset: 345, length: 16]> but was:<[]>
junit.framework.AssertionFailedError: expected:<[offset: 149, length: 17, offset: 184, length: 18, offset: 223, length: 16, offset: 241, length: 17, offset: 258, length: 16, offset: 345, length: 16]> but was:<[]>
	at org.eclipse.cdt.ui.tests.text.doctools.DocCommentHighlightingTest.testDCOM_BDFG(DocCommentHighlightingTest.java:211)
@jonahgraham jonahgraham added the releng Release engineering and project management label Jan 26, 2023
@i-garrison
Copy link
Contributor

This looks like a race in the test.
Adding a couple of sleeps and stepping through in debugger I seldom reproduce the issue with empty result from findRangesColored() and also managed to get different failure in nearby test testDCOM_B

junit.framework.AssertionFailedError:
    expected:<[offset: 149, length: 17, offset: 345, length: 16]>
     but was:<[offset: 129, length: 18, offset: 328, length: 17]>

@jonahgraham
Copy link
Member Author

Thanks @i-garrison for the investigation.

This is now failing basically all the time on GH Actions. I am now looking at this, either full fix, or apply "flaky" to it.

@jonahgraham
Copy link
Member Author

The key thing is that makes testDCOM_BDFG different from the rest of the tests in DocCommentHighlightingTest is that it is run first. Therefore my guess is that some pre-existing state is not being cleared properly.

jonahgraham added a commit to jonahgraham/cdt that referenced this issue Jan 30, 2023
jonahgraham added a commit to jonahgraham/cdt that referenced this issue Jan 30, 2023
This test regularly fails on CI builds, but the test passes ok.

Fixes eclipse-cdt#259
jonahgraham added a commit that referenced this issue Jan 30, 2023
This test regularly fails on CI builds, but the test passes ok.

Fixes #259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flakytests Tracking known flaky tests releng Release engineering and project management
Projects
None yet
2 participants