Skip to content

Commit 966bbb2

Browse files
committed
feat: upgrade dependencies
1 parent 7a6d40a commit 966bbb2

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

client-reactive/src/main/java/com/influxdb/client/reactive/InfluxDBClientReactive.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import com.influxdb.client.InfluxDBClient;
2828
import com.influxdb.client.domain.HealthCheck;
2929

30-
import io.reactivex.rxjava3.core.Single;
30+
import org.reactivestreams.Publisher;
3131

3232
/**
3333
* The reference RxJava client for the <a href="https://github.com/influxdata/influxdb">InfluxDB 2.0</a>
@@ -68,7 +68,7 @@ public interface InfluxDBClientReactive extends AutoCloseable {
6868
* @return health of an instance
6969
*/
7070
@Nonnull
71-
Single<HealthCheck> health();
71+
Publisher<HealthCheck> health();
7272

7373
/**
7474
* @return the {@link LogLevel} that is used for logging requests and responses

client-reactive/src/main/java/com/influxdb/client/reactive/internal/InfluxDBClientReactiveImpl.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
import com.influxdb.client.service.WriteService;
3737
import com.influxdb.utils.Arguments;
3838

39-
import io.reactivex.rxjava3.core.Single;
39+
import io.reactivex.rxjava3.core.Flowable;
40+
import org.reactivestreams.Publisher;
4041
import retrofit2.adapter.rxjava3.RxJava3CallAdapterFactory;
4142

4243
/**
@@ -72,9 +73,9 @@ public WriteReactiveApi getWriteReactiveApi(@Nonnull final WriteOptionsReactive
7273

7374
@Nonnull
7475
@Override
75-
public Single<HealthCheck> health() {
76+
public Publisher<HealthCheck> health() {
7677

77-
return Single.fromCallable(() -> health(healthService.getHealth(null)));
78+
return Flowable.fromCallable(() -> health(healthService.getHealth(null)));
7879
}
7980

8081
@Nonnull

client-reactive/src/test/java/com/influxdb/client/reactive/ITInfluxDBReactiveClient.java

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.junit.jupiter.api.Test;
3030
import org.junit.platform.runner.JUnitPlatform;
3131
import org.junit.runner.RunWith;
32+
import org.reactivestreams.Publisher;
3233

3334
/**
3435
* @author Jakub Bednar (bednar@github) (20/11/2018 08:06)
@@ -51,9 +52,9 @@ void writeClient() {
5152
@Test
5253
void health() {
5354

54-
Single<HealthCheck> check = influxDBClient.health();
55+
Publisher<HealthCheck> check = influxDBClient.health();
5556

56-
check
57+
Single.fromPublisher(check)
5758
.test()
5859
.assertNoErrors()
5960
.assertValue(it -> {
@@ -67,22 +68,22 @@ void health() {
6768
}
6869

6970
@Test
70-
void healthNotRunningInstance() throws Exception {
71+
void healthNotRunningInstance() {
7172

7273
InfluxDBClientReactive clientNotRunning = InfluxDBClientReactiveFactory.create("http://localhost:8099");
73-
Single<HealthCheck> health = clientNotRunning.health();
74+
Publisher<HealthCheck> health = clientNotRunning.health();
7475

75-
health
76-
.test()
77-
.assertNoErrors()
78-
.assertValue(it -> {
76+
Single.fromPublisher(health)
77+
.test()
78+
.assertNoErrors()
79+
.assertValue(it -> {
7980

80-
Assertions.assertThat(it).isNotNull();
81-
Assertions.assertThat(it.getStatus()).isEqualTo(HealthCheck.StatusEnum.FAIL);
82-
Assertions.assertThat(it.getMessage()).startsWith("Failed to connect to");
81+
Assertions.assertThat(it).isNotNull();
82+
Assertions.assertThat(it.getStatus()).isEqualTo(HealthCheck.StatusEnum.FAIL);
83+
Assertions.assertThat(it.getMessage()).startsWith("Failed to connect to");
8384

84-
return true;
85-
});
85+
return true;
86+
});
8687

8788
clientNotRunning.close();
8889
}

0 commit comments

Comments
 (0)