Skip to content

Commit 68729a5

Browse files
authored
Add nop slf4j for tests (#28)
* Add nop slf4j for tests This commit adds nop slf4j test dependency, to suppress noProviders warning. * fix suggestions
1 parent 23cfac0 commit 68729a5

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jar {
8080
def grpcVersion = '1.59.0'
8181
def protobufVersion = '3.24.0'
8282
def protocVersion = protobufVersion
83+
def slf4jVersion = '2.0.7'
8384
def testcontainersVersion = '1.19.6'
8485
def jUnitVersion = '5.8.1'
8586

@@ -90,7 +91,7 @@ dependencies {
9091
implementation "io.grpc:grpc-services:${grpcVersion}"
9192
implementation "io.grpc:grpc-stub:${grpcVersion}"
9293
implementation "com.google.guava:guava:30.1-jre"
93-
implementation "org.slf4j:slf4j-api:2.0.7"
94+
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
9495

9596
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
9697
compileOnly "com.google.code.findbugs:jsr305:3.0.2"
@@ -102,6 +103,7 @@ dependencies {
102103
testImplementation "io.grpc:grpc-testing:${grpcVersion}"
103104
testImplementation "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}"
104105
testImplementation "org.mockito:mockito-core:3.4.0"
106+
testImplementation "org.slf4j:slf4j-nop:${slf4jVersion}"
105107
testImplementation "org.testcontainers:qdrant:${testcontainersVersion}"
106108
testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}"
107109

src/main/java/io/qdrant/client/QdrantClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2594,7 +2594,7 @@ public ListenableFuture<List<ScoredPoint>> discoverAsync(DiscoverPoints request,
25942594
addLogFailureCallback(future, "Discover");
25952595
return Futures.transform(
25962596
future,
2597-
response -> response.getResultList(),
2597+
DiscoverResponse::getResultList,
25982598
MoreExecutors.directExecutor());
25992599
}
26002600

@@ -2644,9 +2644,9 @@ public ListenableFuture<List<BatchResult>> discoverBatchAsync(
26442644
ListenableFuture<DiscoverBatchResponse> future = getPoints(timeout).discoverBatch(requestBuilder.build());
26452645
addLogFailureCallback(future, "Discover batch");
26462646
return Futures.transform(
2647-
future,
2648-
response -> response.getResultList(),
2649-
MoreExecutors.directExecutor());
2647+
future,
2648+
DiscoverBatchResponse::getResultList,
2649+
MoreExecutors.directExecutor());
26502650
}
26512651

26522652
/**

0 commit comments

Comments
 (0)