diff --git a/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedConstructorScopeTest.java b/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedConstructorScopeTest.java index beaa5124d8f..2fba5a25b7e 100644 --- a/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedConstructorScopeTest.java +++ b/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedConstructorScopeTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * Copyright (c) 2009, 2026 itemis AG (http://www.itemis.eu) and others. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. @@ -32,6 +32,7 @@ import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.Iterables; +import org.eclipse.xtext.testing.Flaky; /** * @author Sebastian Zarnekow - Initial contribution and API @@ -75,6 +76,7 @@ public boolean apply(IEObjectDescription input) { })); } + @Flaky @Test public void testGetContents_03() { assumeTrue(JavaCore.getPlugin().getBundle().getVersion().compareTo(new Version(3,31,0)) >= 0); Iterable contents = constructorScope.getAllElements(); @@ -86,6 +88,7 @@ public boolean apply(IEObjectDescription input) { })); } + @Flaky @Test public void testGetContents_04() { assumeTrue(JavaCore.getPlugin().getBundle().getVersion().compareTo(new Version(3,31,0)) >= 0); Iterable contents = constructorScope.getAllElements(); diff --git a/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedSimpleTypeScopeTest.java b/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedSimpleTypeScopeTest.java index 152e5f15070..0d3704e57a6 100644 --- a/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedSimpleTypeScopeTest.java +++ b/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/access/xtext/ui/JdtBasedSimpleTypeScopeTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 itemis AG (http://www.itemis.eu) and others. + * Copyright (c) 2009, 2026 itemis AG (http://www.itemis.eu) and others. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. @@ -25,6 +25,7 @@ import com.google.common.base.Predicate; import com.google.common.base.Predicates; import com.google.common.collect.Iterables; +import org.eclipse.xtext.testing.Flaky; /** * @author Sebastian Zarnekow - Initial contribution and API @@ -44,6 +45,7 @@ public void setUp() throws Exception { typeScope = new JdtBasedSimpleTypeScope(factory.createTypeProvider(resourceSet), new IQualifiedNameConverter.DefaultImpl(),Predicates.alwaysTrue()); } + @Flaky @Test public void testGetContents_01() { Iterable contents = typeScope.getAllElements(); assertTrue(Iterables.any(contents, new Predicate() { @@ -64,6 +66,7 @@ public boolean apply(IEObjectDescription input) { })); } + @Flaky @Test public void testGetContents_03() { Iterable contents = typeScope.getAllElements(); assertTrue(Iterables.any(contents, new Predicate() { diff --git a/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/xtext/ui/ContentAssistTest.java b/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/xtext/ui/ContentAssistTest.java index 81584cd7881..079f1478720 100644 --- a/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/xtext/ui/ContentAssistTest.java +++ b/org.eclipse.xtext.common.types.eclipse.tests/tests/org/eclipse/xtext/common/types/xtext/ui/ContentAssistTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2022 itemis AG (http://www.itemis.eu) and others. + * Copyright (c) 2010, 2026 itemis AG (http://www.itemis.eu) and others. * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. @@ -21,6 +21,7 @@ import org.eclipse.xtext.util.Modules2; import org.junit.BeforeClass; import org.junit.Test; +import org.eclipse.xtext.testing.Flaky; import com.google.inject.Guice; import com.google.inject.Injector; @@ -62,6 +63,7 @@ public Class bindIJavaProjectProvider() { }; } + @Flaky @Test public void testDefaultArrayList_01() throws Exception { //FIXME this does not consider JDT type filter, i.e. TypeFilter#isFiltered(char[],char[]) is not called. @@ -70,6 +72,7 @@ public void testDefaultArrayList_01() throws Exception { builder.assertText("java.lang.Appendable", "com.google.common.io.AppendableWriter"); } + @Flaky @Test public void testDefaultArrayList_02() throws Exception { //FIXME this does not consider JDT type filter, i.e. TypeFilter#isFiltered(char[],char[]) is not called. @@ -78,6 +81,7 @@ public void testDefaultArrayList_02() throws Exception { builder.assertText("Appendable", "com.google.common.io.AppendableWriter"); } + @Flaky @Test public void testCustomArrayList_01() throws Exception { try { newBuilder().append("custom ArrayLis").assertText( @@ -105,6 +109,7 @@ public void testDefaultArrayList_02() throws Exception { } } + @Flaky @Test public void testCustomArrayList_02() throws Exception { try { newBuilder().append("import java.util.* custom ArrayLis").assertText( @@ -134,54 +139,67 @@ public void testDefaultArrayList_02() throws Exception { } } + @Flaky @Test public void testDefaultBlockingQueue_01() throws Exception { newBuilder().append("import java.util.* default BlockingQ").assertText("concurrent.BlockingQueue"); } + @Flaky @Test public void testDefaultBlockingQueue_02() throws Exception { newBuilder().append("import java.* default BlockingQ").assertText("util.concurrent.BlockingQueue"); } + @Flaky @Test public void testCustomArrayList_03() throws Exception { newBuilder().append("import java.util.* custom java.util.ArrayLis").assertText("ArrayList","ArrayList.ArrayListSpliterator"); } + @Flaky @Test public void testCustomBlockingQueue_01() throws Exception { newBuilder().append("import java.util.* custom BlockingQ").assertText("concurrent.BlockingQueue"); } + @Flaky @Test public void testCustomBlockingQueue_02() throws Exception { newBuilder().append("import java.* custom BlockingQ").assertText("util.concurrent.BlockingQueue"); } + @Flaky @Test public void testCustomBlockingQueue_03() throws Exception { newBuilder().append("import java.* custom concurrent.BlockingQ").assertText("util.concurrent.BlockingQueue"); } + @Flaky @Test public void testSubtypeArrayList_01() throws Exception { newBuilder().append("subtype ArrayLis").assertText("java.util.ArrayList", "java.util.Arrays.ArrayList"); } + @Flaky @Test public void testSubtypeArrayList_02() throws Exception { newBuilder().append("import java.util.* subtype ArrayLis").assertText("ArrayList", "Arrays.ArrayList"); } + @Flaky @Test public void testSubtypeHashSet_01() throws Exception { newBuilder().append("subtype HashSe").assertText("java.util.HashSet"); } + @Flaky @Test public void testSubtypeHashSet_02() throws Exception { newBuilder().append("import java.util.* subtype HashSe").assertText("HashSet"); } + @Flaky @Test public void testSubtypeBlockingQueue_01() throws Exception { newBuilder().append("import java.util.* subtype BlockingQ").assertText("concurrent.BlockingQueue"); } + @Flaky @Test public void testSubtypeBlockingQueue_02() throws Exception { newBuilder().append("import java.* subtype BlockingQ").assertText("util.concurrent.BlockingQueue"); } + @Flaky @Test public void testSubtypeBlockingQueue_03() throws Exception { newBuilder().append("import java.* subtype concurrent.BlockingQ").assertText("util.concurrent.BlockingQueue"); } @@ -197,18 +215,21 @@ public void testDefaultArrayList_02() throws Exception { } } + @Flaky @Test public void testMap_01() throws Exception { newBuilder().append("import java.util.* import javax.swing.text.html.* custom java.util.Map").assertText( "java.util.Map"); } + @Flaky @Test public void testMap_02() throws Exception { newBuilder().append("import javax.swing.text.html.* import java.util.* custom java.util.Map").assertText( "java.util.Map"); } + @Flaky @Test public void testMap_03() throws Exception { newBuilder().append("import java.util.* custom java.util.Map").assertText("Map"); } -} + }