Skip to content

Commit c43c767

Browse files
committed
changed log levels to debug
1 parent 3f95a85 commit c43c767

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Diff for: http/src/main/java/com/arangodb/http/HttpConnection.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ private static String getUserAgent() {
118118
vertxToUse = existingVertx;
119119
// Vert.x will not be closed when connection is closed
120120
vertxToClose = null;
121-
LOGGER.info("Reusing existing Vert.x instance");
121+
LOGGER.debug("Reusing existing Vert.x instance");
122122
} else {
123123
// create a new Vert.x instance
124-
LOGGER.info("Creating new Vert.x instance");
124+
LOGGER.debug("Creating new Vert.x instance");
125125
vertxToUse = Vertx.vertx(new VertxOptions().setPreferNativeTransport(true).setEventLoopPoolSize(1));
126126
vertxToUse.runOnContext(e -> Thread.currentThread().setName("adb-http-" + THREAD_COUNT.getAndIncrement()));
127127
// Vert.x be closed when connection is closed
@@ -241,6 +241,7 @@ private static void addHeader(final InternalRequest request, final HttpRequest<?
241241
public void close() {
242242
client.close();
243243
if (vertxToClose != null) {
244+
LOGGER.debug("Closing Vert.x instance");
244245
vertxToClose.close();
245246
}
246247
}

Diff for: resilience-tests/src/test/java/resilience/vertx/VertxTest.java

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void managedVertx() {
2323
adb.shutdown();
2424

2525
assertThat(logs.getLogs())
26-
.filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnectionFactory"))
26+
.filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnection"))
2727
.map(ILoggingEvent::getFormattedMessage)
2828
.anySatisfy(it -> assertThat(it).contains("Creating new Vert.x instance"))
2929
.anySatisfy(it -> assertThat(it).contains("Closing Vert.x instance"));
@@ -45,7 +45,7 @@ void reuseVertx() throws ExecutionException, InterruptedException {
4545
vertx.close();
4646

4747
assertThat(logs.getLogs())
48-
.filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnectionFactory"))
48+
.filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnection"))
4949
.map(ILoggingEvent::getFormattedMessage)
5050
.anySatisfy(it -> assertThat(it).contains("Reusing existing Vert.x instance"));
5151
}
@@ -68,7 +68,10 @@ void notReuseVertx() throws ExecutionException, InterruptedException {
6868
assertThat(logs.getLogs())
6969
.filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnectionFactory"))
7070
.map(ILoggingEvent::getFormattedMessage)
71-
.anySatisfy(it -> assertThat(it).contains("Found an existing Vert.x instance, set reuseVertx=true to reuse it"))
71+
.anySatisfy(it -> assertThat(it).contains("Found an existing Vert.x instance, set reuseVertx=true to reuse it"));
72+
assertThat(logs.getLogs())
73+
.filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnection"))
74+
.map(ILoggingEvent::getFormattedMessage)
7275
.anySatisfy(it -> assertThat(it).contains("Creating new Vert.x instance"))
7376
.anySatisfy(it -> assertThat(it).contains("Closing Vert.x instance"));
7477
}

0 commit comments

Comments
 (0)