aldettinger commented on code in PR #8500:
URL: https://github.com/apache/camel-quarkus/pull/8500#discussion_r3029582924


##########
integration-tests/ibm-cos/src/main/java/org/apache/camel/quarkus/component/ibm/cos/it/IBMCloudObjectStorageResource.java:
##########
@@ -158,6 +160,149 @@ public String receiveMessages() {
                 .collect(Collectors.joining("\n"));
     }
 
+    @Path("/consumer/count")
+    @GET
+    @Produces(MediaType.TEXT_PLAIN)
+    public int getMessageCount() {
+        final MockEndpoint mockEndpoint = context.getEndpoint("mock:result", 
MockEndpoint.class);
+        return mockEndpoint.getReceivedExchanges().size();
+    }
+
+    @Path("/consumer/reset")
+    @POST
+    public Response resetConsumer() {
+        final MockEndpoint mockEndpoint = context.getEndpoint("mock:result", 
MockEndpoint.class);
+        mockEndpoint.reset();

Review Comment:
   We had issue in the past using mock endpoint reset. On the top of my head, 
there was flakiness issues and also some messages from different tests mixed. 
And we ended up using single usage mock, something ala 
`mock:result-updateTest`, `mock:result-deleteTest`. Not sure we have actual 
issues here, just sharing some previous tips that could prevent potential issue.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to