You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/12/04 17:57:16 UTC

[isis] 02/02: ISIS-3275: stress-testing with prompts

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch spring6
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 1f988536fa4084578e6ab3653b5470e03afacb44
Author: andi-huber <ah...@apache.org>
AuthorDate: Sun Dec 4 18:57:07 2022 +0100

    ISIS-3275: stress-testing with prompts
---
 .../causeway/testdomain/rest/RestServiceStressTest.java      | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/regressiontests/stable-rest/src/test/java/org/apache/causeway/testdomain/rest/RestServiceStressTest.java b/regressiontests/stable-rest/src/test/java/org/apache/causeway/testdomain/rest/RestServiceStressTest.java
index 0b8eaa4724..f2c0edd71d 100644
--- a/regressiontests/stable-rest/src/test/java/org/apache/causeway/testdomain/rest/RestServiceStressTest.java
+++ b/regressiontests/stable-rest/src/test/java/org/apache/causeway/testdomain/rest/RestServiceStressTest.java
@@ -23,6 +23,7 @@ import java.util.stream.IntStream;
 import jakarta.inject.Inject;
 
 import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
 import org.springframework.boot.test.context.SpringBootTest;
@@ -35,6 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 import org.apache.causeway.commons.internal.base._Timing;
+import org.apache.causeway.commons.internal.debug.swt._Swt;
 import org.apache.causeway.core.config.presets.CausewayPresets;
 import org.apache.causeway.testdomain.conf.Configuration_usingJdo;
 import org.apache.causeway.testdomain.util.rest.RestEndpointService;
@@ -59,12 +61,19 @@ class RestServiceStressTest {
     @LocalServerPort int port; // just for reference (not used)
     @Inject RestEndpointService restService;
 
+    @BeforeAll
+    static void init() {
+        _Swt.enableSwing();
+    }
+
     //TODO[ISIS-3275] performance regression compared to v2: 26s vs 6s
     @Test
     void bookOfTheWeek_stressTest() {
 
         assertTrue(restService.getPort()>0);
 
+        _Swt.prompt("get ready for stress testing");
+
         val useRequestDebugLogging = false;
         final int clients = 16;
         final int iterations = 1000;
@@ -88,6 +97,9 @@ class RestServiceStressTest {
             });
 
         });
+
+        _Swt.prompt("stress testing done");
+
     }
 
     void requestSingleBookOfTheWeek_viaRestEndpoint(final RestfulClient restfulClient) {