-
Notifications
You must be signed in to change notification settings - Fork 54
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
Maintenance/mitigate flaky tests #139
Changes from all commits
56b6a8f
f93a18b
4d3cb48
ca4daa5
d2de4f8
63c358f
7b159bd
8530975
5d289a0
1c0f0ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,10 +103,12 @@ public void testAsyncRenameHandlerEnablement() throws Exception { | |
ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); | ||
Command command = commandService.getCommand(IWorkbenchCommandConstants.FILE_RENAME); | ||
assertFalse(command.isEnabled() && command.isHandled()); | ||
|
||
Thread.sleep(2 * delay); | ||
assertTrue(command.isEnabled()); | ||
assertTrue(command.isHandled()); | ||
|
||
Thread.sleep(delay * 3); | ||
|
||
// Put back so shutdown doesn't time out | ||
MockLanguageServer.INSTANCE.setTimeToProceedQueries(0); | ||
assertTrue(command.isEnabled() && command.isHandled()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could you please keep the asserts separate:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry - the email notification of your comment only arrived after I had independently fixed the build errors and @mickaelistria had merged... Please feel free to revert to two separate asserts. |
||
} | ||
|
||
@Test | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of doing this in a loop without a sleep or something in between?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a fairly long-running call so I didn't feel the need to stick a sleep in between, but I take your point!