Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/AllCommonPluginTests.java3
-rw-r--r--plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/Session1MillionTests.java17
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/AllCommonPluginTests.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/AllCommonPluginTests.java
index 219a835f78..64d4176afd 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/AllCommonPluginTests.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/AllCommonPluginTests.java
@@ -326,7 +326,6 @@ public class AllCommonPluginTests extends TestCase {
suite.addTestSuite(SubMenusPrioritiesTest.class);
suite.addTestSuite(ZombieViewpointsTest.class);
- suite.addTestSuite(Session1MillionTests.class);
suite.addTestSuite(DAnnotationTest.class);
}
@@ -340,6 +339,8 @@ public class AllCommonPluginTests extends TestCase {
public static void addNonGerritPart(TestSuite suite) {
// This one takes too long (12 minutes) to be part of the Gerrit suite.
suite.addTestSuite(AcceleoMTInterpreterOnPackageImportTests.class);
+ // Almost 2 minutes for this once since 8cf04acad92e8646077e69a5c869923168c30f54
+ suite.addTestSuite(Session1MillionTests.class);
// The ones below are "blacklisted" for now because they caused at least
// one false-negative Gerrit Verification job
suite.addTestSuite(SessionManagerListener2Tests.class);
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/Session1MillionTests.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/Session1MillionTests.java
index 2f2fe41da2..dabc1a2e95 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/Session1MillionTests.java
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/Session1MillionTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2016 Obeo.
+ * Copyright (c) 2016, 2017 Obeo.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -15,6 +15,8 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.URI;
@@ -39,19 +41,16 @@ import com.google.common.collect.Sets;
*/
public class Session1MillionTests extends SiriusDiagramTestCase {
/**
- * limit is set empirically: this projects takes less than 10 seconds on my
- * machine with an SSD drive.
+ * limit is set empirically.
*/
- private static final long MAX_TIME_TO_OPEN_SECONDS = 15;
+ private static final long MAX_TIME_TO_OPEN_SECONDS = 110;
- private static final long MAX_TIME_TO_CLOSE_SECONDS = 2;
+ private static final long MAX_TIME_TO_CLOSE_SECONDS = 10;
private static final int NUMBER_Of_ELEMENTS = 966220;
- private static final String[] SEMANTIC_ROOTS = { "/reverse1.ecorebin", "/reverse2.ecorebin", "/reverse3.ecorebin", "/reverse4.ecorebin", "/reverse5.ecorebin", "/reverse6.ecorebin",
- "/reverse7.ecorebin", "/reverse8.ecorebin", "/reverse9.ecorebin", "/reverse10.ecorebin", "/reverse11.ecorebin", "/reverse12.ecorebin", "/reverse13.ecorebin", "/reverse14.ecorebin",
- "/reverse15.ecorebin", "/reverse16.ecorebin", "/reverse17.ecorebin", "/reverse18.ecorebin", "/reverse19.ecorebin", "/reverse20.ecorebin" };
-
+ private static final String[] SEMANTIC_ROOTS = IntStream.range(1, 21).mapToObj(i -> String.format("/reverse%d.ecorebin", i)).collect(Collectors.toList()).toArray(new String[0]);
+
private static final String AIRD_ROOT = "/representations.aird";
@Override

Back to the top