You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/08/25 11:32:51 UTC

[camel] branch main updated (4912e28106b -> acf10b75c63)

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

orpiske pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


    from 4912e28106b CAMEL-18406: camel-jbang - Status command
     new d991a2beae7 (chores) camel-test-infra-chatscript: initialize/shutdown in all steps
     new acf10b75c63 (chores) camel-chatscript: fixed tests failures due to test-infra changes

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/camel/component/ChatScriptComponentIT.java |  8 ++++----
 .../services/ChatScriptLocalContainerService.java         |  3 ++-
 .../test/infra/chatscript/services/ChatScriptService.java | 15 ++++++++++++++-
 3 files changed, 20 insertions(+), 6 deletions(-)


[camel] 02/02: (chores) camel-chatscript: fixed tests failures due to test-infra changes

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit acf10b75c63904e0833edcd7dbd0bea799f6f621
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Aug 25 09:16:06 2022 +0200

    (chores) camel-chatscript: fixed tests failures due to test-infra changes
    
    - adjust test timeout to avoid false negatives
    - adjust lifecycle due to test-infra changes
---
 .../java/org/apache/camel/component/ChatScriptComponentIT.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentIT.java b/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentIT.java
index e52f077ce29..8fdfcdbfc5c 100644
--- a/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentIT.java
+++ b/components/camel-chatscript/src/test/java/org/apache/camel/component/ChatScriptComponentIT.java
@@ -34,16 +34,16 @@ import org.slf4j.LoggerFactory;
 import org.testcontainers.shaded.org.awaitility.Awaitility;
 
 public class ChatScriptComponentIT extends CamelTestSupport {
-    @RegisterExtension
-    static ChatScriptService service = ChatScriptServiceFactory.createService();
-
     private static final Logger LOG = LoggerFactory.getLogger(ChatScriptComponentIT.class);
 
+    @RegisterExtension
+    public ChatScriptService service = ChatScriptServiceFactory.createService();
+
     @Test
     public void testChatScript() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedMinimumMessageCount(1);
-        Awaitility.await().atMost(Duration.ofMillis(100)).untilAsserted(() -> assertMockEndpointsSatisfied());
+        Awaitility.await().atMost(Duration.ofSeconds(2)).untilAsserted(() -> assertMockEndpointsSatisfied());
     }
 
     @Override


[camel] 01/02: (chores) camel-test-infra-chatscript: initialize/shutdown in all steps

Posted by or...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d991a2beae7345b7013c44e0cdd084aa41f3fafe
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Aug 25 09:15:59 2022 +0200

    (chores) camel-test-infra-chatscript: initialize/shutdown in all steps
---
 .../services/ChatScriptLocalContainerService.java         |  3 ++-
 .../test/infra/chatscript/services/ChatScriptService.java | 15 ++++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptLocalContainerService.java b/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptLocalContainerService.java
index bded97d0911..41809614c90 100644
--- a/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptLocalContainerService.java
+++ b/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptLocalContainerService.java
@@ -45,6 +45,7 @@ public class ChatScriptLocalContainerService implements ChatScriptService, Conta
     public void initialize() {
         LOG.info("Trying to start the ChatScript container");
         container.start();
+        registerProperties();
 
         LOG.info("ChatScript instance running at {}", serviceAddress());
     }
@@ -62,6 +63,6 @@ public class ChatScriptLocalContainerService implements ChatScriptService, Conta
 
     @Override
     public String serviceAddress() {
-        return container.getTestHostIpAddress() + ":" + container.getMappedPort(SERVICE_PORT);
+        return container.getHost() + ":" + container.getMappedPort(SERVICE_PORT);
     }
 }
diff --git a/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptService.java b/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptService.java
index ede9d434aa3..dab5c98dbf7 100644
--- a/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptService.java
+++ b/test-infra/camel-test-infra-chatscript/src/test/java/org/apache/camel/test/infra/chatscript/services/ChatScriptService.java
@@ -18,13 +18,16 @@ package org.apache.camel.test.infra.chatscript.services;
 
 import org.apache.camel.test.infra.common.services.TestService;
 import org.junit.jupiter.api.extension.AfterAllCallback;
+import org.junit.jupiter.api.extension.AfterEachCallback;
 import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
 import org.junit.jupiter.api.extension.ExtensionContext;
 
 /**
  * Test infra service for ChatScript
  */
-public interface ChatScriptService extends BeforeAllCallback, AfterAllCallback, TestService {
+public interface ChatScriptService
+        extends BeforeAllCallback, AfterAllCallback, BeforeEachCallback, AfterEachCallback, TestService {
 
     String serviceAddress();
 
@@ -37,4 +40,14 @@ public interface ChatScriptService extends BeforeAllCallback, AfterAllCallback,
     default void afterAll(ExtensionContext extensionContext) throws Exception {
         shutdown();
     }
+
+    @Override
+    default void afterEach(ExtensionContext extensionContext) throws Exception {
+        shutdown();
+    }
+
+    @Override
+    default void beforeEach(ExtensionContext extensionContext) throws Exception {
+        initialize();
+    }
 }