diff options
| author | Pierre-Charles David | 2017-06-29 08:18:17 +0000 |
|---|---|---|
| committer | Pierre-Charles David | 2017-06-29 08:23:30 +0000 |
| commit | 6d22567e96e95ebd9ee69382ac5de55c9e7c5d12 (patch) | |
| tree | 09ed8a9a729cb22079368a8fd0297f920d4b8fb3 | |
| parent | fc8a1dc3b93a3e8f0fda2a1f17a7da4b894c9f98 (diff) | |
| download | org.eclipse.sirius-6d22567e96e95ebd9ee69382ac5de55c9e7c5d12.tar.gz org.eclipse.sirius-6d22567e96e95ebd9ee69382ac5de55c9e7c5d12.tar.xz org.eclipse.sirius-6d22567e96e95ebd9ee69382ac5de55c9e7c5d12.zip | |
[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 <pierre-charles.david@obeo.fr>
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 |
