use of org.springframework.ide.vscode.languageserver.testharness.SynchronizationPoint in project sts4 by spring-projects.
the class ConcourseEditorTest method reconcilerRaceCondition.
@Test
public void reconcilerRaceCondition() throws Exception {
SynchronizationPoint reconcilerThreadStart = harness.reconcilerThreadStart();
Editor editor = harness.newEditor("garbage");
// Blocks until the reconciler thread is reached.
reconcilerThreadStart.reached();
try {
String editorContents = editor.getRawText();
for (int i = 0; i < 4; i++) {
editorContents = "\n" + editorContents;
editor.setText(editorContents);
}
} finally {
reconcilerThreadStart.unblock();
}
editor.assertRawText("\n" + "\n" + "\n" + "\n" + "garbage");
editor.assertProblems("garbage|Expecting a 'Map'");
}
Aggregations