Skip to content

Commit 289a11d

Browse files
committed
CompletionHandlerTest.testCompletion_Lambda fails randomly
1 parent 722fb11 commit 289a11d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

org.eclipse.jdt.ls.tests/src/org/eclipse/jdt/ls/core/internal/handlers/CompletionHandlerTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3461,7 +3461,12 @@ public void testCompletion_Lambda() throws Exception {
34613461
assertNotNull(lambda);
34623462
assertTrue(lambda.getTextEdit().getLeft().getNewText().matches("\\$\\{1:\\w+\\} -> \\$\\{0\\}"));
34633463

3464-
assertEquals("(Object arg0) ->", lambda.getLabel());
3464+
try {
3465+
assertEquals("(Object t) ->", lambda.getLabel());
3466+
} catch (ComparisonFailure e) {
3467+
// In case the JDK has no sources
3468+
assertEquals("(Object arg0) ->", lambda.getLabel());
3469+
}
34653470
assertNull(lambda.getLabelDetails().getDetail());
34663471
assertEquals(lambda.getLabelDetails().getDescription(), "void");
34673472
}

0 commit comments

Comments
 (0)