|
3 | 3 | import ch.qos.logback.classic.Level;
|
4 | 4 | import ch.qos.logback.classic.spi.ILoggingEvent;
|
5 | 5 | import com.arangodb.ArangoDB;
|
| 6 | +import com.arangodb.PackageVersion; |
6 | 7 | import com.arangodb.http.HttpConnection;
|
7 | 8 | import com.arangodb.http.HttpProtocolConfig;
|
8 | 9 | import io.vertx.core.Vertx;
|
@@ -93,14 +94,16 @@ void existingVertxNotUsed() throws ExecutionException, InterruptedException {
|
93 | 94 | }).toCompletionStage().toCompletableFuture().get();
|
94 | 95 | vertx.close();
|
95 | 96 |
|
96 |
| - assertThat(logs.getLogs()) |
97 |
| - .filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnectionFactory")) |
98 |
| - .filteredOn(it -> it.getLevel().equals(Level.WARN)) |
99 |
| - .map(ILoggingEvent::getFormattedMessage) |
100 |
| - .anySatisfy(it -> assertThat(it) |
101 |
| - .contains("Found an existing Vert.x instance, you can reuse it by setting:") |
102 |
| - .contains(".protocolConfig(HttpProtocolConfig.builder().vertx(Vertx.currentContext().owner()).build())") |
103 |
| - ); |
| 97 | + if (!PackageVersion.SHADED) { |
| 98 | + assertThat(logs.getLogs()) |
| 99 | + .filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnectionFactory")) |
| 100 | + .filteredOn(it -> it.getLevel().equals(Level.WARN)) |
| 101 | + .map(ILoggingEvent::getFormattedMessage) |
| 102 | + .anySatisfy(it -> assertThat(it) |
| 103 | + .contains("Found an existing Vert.x instance, you can reuse it by setting:") |
| 104 | + .contains(".protocolConfig(HttpProtocolConfig.builder().vertx(Vertx.currentContext().owner()).build())") |
| 105 | + ); |
| 106 | + } |
104 | 107 | assertThat(logs.getLogs())
|
105 | 108 | .filteredOn(it -> it.getLoggerName().equals("com.arangodb.http.HttpConnection"))
|
106 | 109 | .filteredOn(it -> it.getLevel().equals(Level.DEBUG))
|
|
0 commit comments