Skip to main content
diff options
authorPierre-Charles David2017-06-29 08:18:17 +0000
committerPierre-Charles David2017-06-29 08:23:30 +0000
commit6d22567e96e95ebd9ee69382ac5de55c9e7c5d12 (patch)
parentfc8a1dc3b93a3e8f0fda2a1f17a7da4b894c9f98 (diff)
[518259] Update Session1MillionTests and move it out of the Gerrit suite
Commit 8cf04acad92e8646077e69a5c869923168c30f54 forces the installation of the cross-referencer during the session opening to fix potential bugs and more generally have a more reliable/predictable behavior. It causes performances regressions when opening sessions with big semantic models which happen to have no viewpoint currently enabled. This is probably rare in practice, but it affects at least the test session used by Session1MillionTests, causing it to take around 100s to open (from less that 15s normally). The "regression" only concerns artificial corner cases, which happen to apply to Session1MillionTest, but: * it fixes a real bug that can be visible to end-users; * it only highlights that the conditions tested by Session1MillionTest does not really match normal use cases situation, and the times it checks do not correspond to what real users would see anyway. Note that even without commit 8cf04acad92e864, enabling a single viewpoint in the test aird increases the session opening time to ~100s. Bug: 518259 Change-Id: I4f3bbf03480d5c787f429ad8240de981d9b37fea Signed-off-by: Pierre-Charles David <>
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/
index 219a835f78..64d4176afd 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/suite/common/
@@ -326,7 +326,6 @@ public class AllCommonPluginTests extends TestCase {
- suite.addTestSuite(Session1MillionTests.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.
+ // 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
diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/
index 2f2fe41da2..dabc1a2e95 100644
--- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/
+++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/perf/common/
@@ -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 org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.URI;
@@ -39,19 +41,16 @@ import;
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";

Back to the top