Skip to content

Commit

Permalink
Remove console logs to restore flakiness, keep the route log to catch…
Browse files Browse the repository at this point in the history
… information #3584
  • Loading branch information
aldettinger committed Jun 13, 2022
1 parent e82c314 commit 476fb78
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,27 +99,18 @@ public void startRoute(String routeId) throws Exception {
@Path("/getFromMock/{mockId}")
@GET
public String getFromMock(@PathParam("mockId") String mockId) {
System.out.println("CAMEL-QUARKUS-3584 => FileResource.getFromMock(" + mockId + ").thread.id => "
+ Thread.currentThread().getId());
MockEndpoint mockEndpoint = context.getEndpoint("mock:" + mockId, MockEndpoint.class);
System.out.println("CAMEL-QUARKUS-3584 => FileResource.getFromMock(" + mockId + ").mockEndpoint => 0x"
+ System.identityHashCode(mockEndpoint));

String result = mockEndpoint.getExchanges().stream().map(e -> e.getIn().getBody(String.class))
.collect(Collectors.joining(SEPARATOR));

System.out.println("CAMEL-QUARKUS-3584 => FileResource.getFromMock(" + mockId + ") returns => " + result);

return result;
}

@Path("/resetMock/{mockId}")
@GET
public void resetMock(@PathParam("mockId") String mockId) {
System.out.println("CAMEL-QUARKUS-3584 => FileResource.resetMock().thread.id => " + Thread.currentThread().getId());
MockEndpoint mockEndpoint = context.getEndpoint("mock:" + mockId, MockEndpoint.class);
System.out.println(
"CAMEL-QUARKUS-3584 => FileResource.resetMock.mockEndpoint => 0x" + System.identityHashCode(mockEndpoint));
mockEndpoint.reset();
}

Expand All @@ -130,7 +121,6 @@ public void resetMock(@PathParam("mockId") String mockId) {
public Response createFile(@PathParam("folder") String folder, byte[] content, @QueryParam("charset") String charset,
@QueryParam("fileName") String fileName)
throws Exception {
System.out.println("CAMEL-QUARKUS-3584 => FileResource.createFile().thread.id => " + Thread.currentThread().getId());
StringBuilder url = new StringBuilder("file:target/" + folder + "?initialDelay=10");
if (charset != null && !charset.equals("")) {
url.append("&charset=").append(charset);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ public void batch() throws InterruptedException, UnsupportedEncodingException {

@Test
public void idempotent() throws IOException {
System.out.println("CAMEL-QUARKUS-3584 => FileTest.idempotent().thread.id => " + Thread.currentThread().getId());
// Create a new file
String fileName01 = createFile(FILE_CONTENT_01, "/file/create/idempotent");

Expand Down Expand Up @@ -150,7 +149,6 @@ public void idempotent() throws IOException {

@Test
public void filter() throws IOException {
System.out.println("CAMEL-QUARKUS-3584 => FileTest.filter().thread.id => " + Thread.currentThread().getId());
String fileName = createFile(FILE_CONTENT_01, "/file/create/filter", null, "skip_" + UUID.randomUUID().toString());
createFile(FILE_CONTENT_02, "/file/create/filter");

Expand All @@ -166,7 +164,6 @@ public void filter() throws IOException {

@Test
public void sortBy() throws IOException, InterruptedException {
System.out.println("CAMEL-QUARKUS-3584 => FileTest.sortBy().thread.id => " + Thread.currentThread().getId());
createFile(FILE_CONTENT_03, "/file/create/" + SORT_BY, null, "c_" + UUID.randomUUID().toString());
createFile(FILE_CONTENT_01, "/file/create/" + SORT_BY, null, "a_" + UUID.randomUUID().toString());
createFile(FILE_CONTENT_02, "/file/create/" + SORT_BY, null, "b_" + UUID.randomUUID().toString());
Expand Down

0 comments on commit 476fb78

Please sign in to comment.