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

Failure of test: CompletionTest.testCompletionService() #906

Open
fedejeanne opened this issue Jul 3, 2023 · 4 comments
Open

Failure of test: CompletionTest.testCompletionService() #906

fedejeanne opened this issue Jul 3, 2023 · 4 comments
Assignees
Labels
test junit test related things

Comments

@fedejeanne
Copy link
Contributor

The test CompletionTest.testCompletionService() failed for Mac OS in this run of the PR #755 :

Widget is disposed
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4918)
	at org.eclipse.swt.SWT.error(SWT.java:4833)
	at org.eclipse.swt.SWT.error(SWT.java:4804)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:811)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:597)
	at org.eclipse.swt.widgets.Table.getItem(Table.java:1597)
	at org.eclipse.ui.genericeditor.tests.CompletionTest$3.condition(CompletionTest.java:184)
	at org.eclipse.jface.text.tests.util.DisplayHelper.waitForCondition(DisplayHelper.java:79)
	at org.eclipse.ui.genericeditor.tests.CompletionTest.checkCompletionContent(CompletionTest.java:186)
	at org.eclipse.ui.genericeditor.tests.CompletionTest.testCompletionService(CompletionTest.java:111)
...
@fedejeanne
Copy link
Contributor Author

This issue might have been solved by PR 725 in SWT.
If the test doesn't fail again in the next few days, this issue can be closed.

@laeubi
Copy link
Contributor

laeubi commented Jul 25, 2023

@HeikoKlare HeikoKlare self-assigned this Jul 25, 2023
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 25, 2023
…pse-platform#907

In the CompletionTest, the check for the completion proposals waits for
the full list of proposal items to be calculated. The condition is never
fulfilled because it checks for the first proposal item to change while
only its data will be replaced. In consequence, waiting for the
condition always runs into a timeout.

This change corrects the conditions and refactors the logic for checking
for the "computing" entry into a separate method.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 25, 2023
…pse-platform#907

In the CompletionTest, the check for the completion proposals waits for
the full list of proposal items to be calculated. The condition is never
fulfilled because it checks for the first proposal item to change while
only its data will be replaced. In consequence, waiting for the
condition always runs into a timeout.

This change corrects the conditions and refactors the logic for checking
for the "computing" entry into a separate method.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 25, 2023
…pse-platform#907

In the CompletionTest, the check for the completion proposals waits for
the full list of proposal items to be calculated. The condition is never
fulfilled because it checks for the first proposal item to change while
only its data will be replaced. In consequence, waiting for the
condition always runs into a timeout.

This change corrects the conditions and refactors the logic for checking
for the "computing" entry into a separate method.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 25, 2023
…atform#906

The test cases for completion proposals in CompletionTest depend on
specific timing behavior of a test proposal processor. On one hand, this
is prone to errors if proper timing is not given on the test
environment. On the other hand, the tests run unnecessarily long because
of waiting long enough.

This change replaces the fixed-time waiting of the
LongRunningBarContentAssistProcessor with an explicit trigger that
finalizes the content calculation as soon as some barrier is reached
within the tests.
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 25, 2023
…atform#906 eclipse-platform#907

The test cases for completion proposals in CompletionTest depend on
specific timing behavior of a test proposal processor. On one hand, this
is prone to errors if proper timing is not given on the test
environment. On the other hand, the tests run unnecessarily long because
of waiting long enough.

This change replaces the fixed-time waiting of the
LongRunningBarContentAssistProcessor with an explicit trigger that
finalizes the content calculation as soon as some barrier is reached
within the tests.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 25, 2023
…atform#906 eclipse-platform#907

The test cases for completion proposals in CompletionTest depend on
specific timing behavior of a test proposal processor. On one hand, this
is prone to errors if proper timing is not given on the test
environment. On the other hand, the tests run unnecessarily long because
of waiting long enough.

This change replaces the fixed-time waiting of the
LongRunningBarContentAssistProcessor with an explicit trigger that
finalizes the content calculation as soon as some barrier is reached
within the tests.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
HeikoKlare added a commit that referenced this issue Jul 25, 2023
In the CompletionTest, the check for the completion proposals waits for
the full list of proposal items to be calculated. The condition is never
fulfilled because it checks for the first proposal item to change while
only its data will be replaced. In consequence, waiting for the
condition always runs into a timeout.

This change corrects the conditions and refactors the logic for checking
for the "computing" entry into a separate method.

Contributes to
#906 and
#907
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 25, 2023
…atform#906 eclipse-platform#907

The test cases for completion proposals in CompletionTest depend on
specific timing behavior of a test proposal processor. On one hand, this
is prone to errors if proper timing is not given on the test
environment. On the other hand, the tests run unnecessarily long because
of waiting long enough.

This change replaces the fixed-time waiting of the
LongRunningBarContentAssistProcessor with an explicit trigger that
finalizes the content calculation as soon as some barrier is reached
within the tests.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 26, 2023
Provide more meaningful error message in case any of the test cases in
CompletionTest fails. Particularly also explicitly validate whether the
proposal list widget has been disposed concurrently. Remove typo in
method name.

Contributes to
eclipse-platform#906
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 26, 2023
Provide more meaningful error message in case any of the test cases in
CompletionTest fails. Particularly also explicitly validate whether the
proposal list widget has been disposed concurrently. Remove typo in
method name.

Contributes to
eclipse-platform#906
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 26, 2023
Provide more meaningful error message in case any of the test cases in
CompletionTest fails. Particularly also explicitly validate whether the
proposal list widget has been disposed concurrently. Remove typo in
method name.

Contributes to
eclipse-platform#906
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 26, 2023
Provide more meaningful error message in case any of the test cases in
CompletionTest fails. Particularly also explicitly validate whether the
proposal list widget has been disposed concurrently.

Contributes to
eclipse-platform#906
HeikoKlare added a commit that referenced this issue Jul 26, 2023
Provide more meaningful error message in case any of the test cases in
CompletionTest fails. Particularly also explicitly validate whether the
proposal list widget has been disposed concurrently.

Contributes to
#906
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 26, 2023
…atform#906 eclipse-platform#907

The test cases for completion proposals in CompletionTest depend on
specific timing behavior of a test proposal processor. On one hand, this
is prone to errors if proper timing is not given on the test
environment. On the other hand, the tests run unnecessarily long because
of waiting long enough.

This change replaces the fixed-time waiting of the
LongRunningBarContentAssistProcessor with an explicit trigger that
finalizes the content calculation as soon as some barrier is reached
within the tests.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 27, 2023
…atform#906

The test cases for completion proposals in CompletionTest depend on
specific timing behavior of a test proposal processor. On one hand, this
is prone to errors if proper timing is not given on the test
environment. On the other hand, the tests run unnecessarily long because
of waiting long enough.

This change replaces the fixed-time waiting of the
LongRunningBarContentAssistProcessor with an explicit trigger that
finalizes the content calculation as soon as some barrier is reached
within the tests. In addition, the long-running processor is only
enabled on demand and will be finalized whenever a test case was
executed to avoid that the processor thread is leaking to the next test
case.

Contributes to
eclipse-platform#906
HeikoKlare added a commit to HeikoKlare/eclipse.platform.ui that referenced this issue Jul 31, 2023
…atform#906

The test cases for completion proposals in CompletionTest depend on
specific timing behavior of a test proposal processor. On one hand, this
is prone to errors if proper timing is not given on the test
environment. On the other hand, the tests run unnecessarily long because
of waiting long enough.

This change replaces the fixed-time waiting of the
LongRunningBarContentAssistProcessor with an explicit trigger that
finalizes the content calculation as soon as some barrier is reached
within the tests. In addition, the long-running processor is only
enabled on demand and will be finalized whenever a test case was
executed to avoid that the processor thread is leaking to the next test
case.

Contributes to
eclipse-platform#906
@BeckerWdf
Copy link
Contributor

Fails also in #939

praveen-skp pushed a commit to praveen-skp/eclipse.platform.ui that referenced this issue Aug 8, 2023
…pse-platform#907

In the CompletionTest, the check for the completion proposals waits for
the full list of proposal items to be calculated. The condition is never
fulfilled because it checks for the first proposal item to change while
only its data will be replaced. In consequence, waiting for the
condition always runs into a timeout.

This change corrects the conditions and refactors the logic for checking
for the "computing" entry into a separate method.

Contributes to
eclipse-platform#906 and
eclipse-platform#907
praveen-skp pushed a commit to praveen-skp/eclipse.platform.ui that referenced this issue Aug 8, 2023
Provide more meaningful error message in case any of the test cases in
CompletionTest fails. Particularly also explicitly validate whether the
proposal list widget has been disposed concurrently.

Contributes to
eclipse-platform#906
@iloveeclipse
Copy link
Member

iloveeclipse commented Aug 16, 2023

It is failing in jenkins on almost every build. I'm going to disable the test.

Completion proposal list was unexpectedly disposed
java.lang.AssertionError: Completion proposal list was unexpectedly disposed
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.assertTrue(Assert.java:42)
	at org.junit.Assert.assertFalse(Assert.java:65)
	at org.eclipse.ui.genericeditor.tests.CompletionTest$1.condition(CompletionTest.java:137)
	at org.eclipse.jface.text.tests.util.DisplayHelper.waitForCondition(DisplayHelper.java:79)
	at org.eclipse.ui.genericeditor.tests.CompletionTest.waitForProposalRelatedCondition(CompletionTest.java:140)
	at org.eclipse.ui.genericeditor.tests.CompletionTest.checkCompletionContent(CompletionTest.java:191)
	at org.eclipse.ui.genericeditor.tests.CompletionTest.testCompletionService(CompletionTest.java:118)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test junit test related things
Projects
None yet
Development

No branches or pull requests

6 participants