diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy b/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy index 0604b83d0eec..4073e8557807 100644 --- a/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy +++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/completion/JavaAutoPopupTest.groovy @@ -1774,7 +1774,11 @@ class Foo { void "test autopopup after package completion"() { myFixture.addClass("package foo.bar.goo; class Foo {}") myFixture.configureByText "a.java", "class Foo { { foo.b } }" - assert myFixture.completeBasic() == null + def items = myFixture.completeBasic() + if (items != null) { // completion took a bit longer, and the single item wasn't inserted automatically + assert myFixture.lookupElementStrings == ['bar'] + myFixture.type('\n') + } assert myFixture.editor.document.text.contains('foo.bar. ') joinAutopopup() joinCompletion()