This is an automated email from the ASF dual-hosted git repository.
nfilotto pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c6032e32c65 CAMEL-17948: Fix regression in WsProducerConsumerTest
(#7448)
c6032e32c65 is described below
commit c6032e32c65cb951fbe9ca987e1de691df2ae30d
Author: Nicolas Filotto <[email protected]>
AuthorDate: Thu Apr 14 11:39:38 2022 +0200
CAMEL-17948: Fix regression in WsProducerConsumerTest (#7448)
## Motivation
The changes made in https://github.com/apache/camel/pull/7430 caused a
regression in `WsProducerConsumerTest` that needs to be fixed
## Modifications:
* Reset the mocks directly after the assertion checks to avoid race
conditions issues in the rest of the test
---
.../java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java
b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java
index 94b567d251b..c6e18ef4a65 100644
---
a/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java
+++
b/components/camel-ahc-ws/src/test/java/org/apache/camel/component/ahc/ws/WsProducerConsumerTest.java
@@ -150,13 +150,12 @@ public class WsProducerConsumerTest extends
CamelTestSupport {
mock.expectedBodiesReceived(TEST_CONNECTED_MESSAGE);
mock.assertIsSatisfied();
+ resetMocks();
LOG.info("Restarting Test Server");
stopTestServer();
startTestServer();
- resetMocks();
-
mock.expectedBodiesReceived(TEST_CONNECTED_MESSAGE);
mock.assertIsSatisfied();