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

Fix Commonalities UI tests race condition #74

Open
JanWittler opened this issue Oct 13, 2022 · 1 comment
Open

Fix Commonalities UI tests race condition #74

JanWittler opened this issue Oct 13, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@JanWittler
Copy link
Contributor

In the Commonalities UI tests, in the class MissingBundlesQuickfixTest.xtend, the test fixMissingRuntimeBundle contains a race condition. More specifically, after modifying a plugin project using the asynchronous apply method, it is not waited until the specific marker file is written. Thus, to resolve the issue, apply should be called using a progress monitor and test execution should only continue after the monitor's done method is called. However, as of 13/10/22, the done method is never called due to an internal bug. As such, currently the workaround of waiting 200ms after calling the apply method is applied (in #71). As soon as the bug is resolved by the Eclipse community, the workaround should be replaced by a proper implementation.
An example solution to the problem could look like this

Semaphore semaphore = new Semaphore(0);
pluginProject.apply(new NullProgressMonitor() {
  public void done() {
    semaphore.release();
  }			
});
semaphore.acquire();

The same workaround was also applied to ProjectQuickfix.xtend.

@JanWittler JanWittler added the enhancement New feature or request label Oct 13, 2022
@JanWittler
Copy link
Contributor Author

JanWittler commented Oct 17, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant