Skip to content

Commit c8d6a82

Browse files
committed
Bump dependencies.
[#300] Signed-off-by: Mark Paluch <[email protected]>
1 parent 05f724d commit c8d6a82

3 files changed

Lines changed: 18 additions & 38 deletions

File tree

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@
3636
<hikari-cp.version>4.0.3</hikari-cp.version>
3737
<java.version>1.8</java.version>
3838
<jsr305.version>3.0.2</jsr305.version>
39-
<junit.version>5.9.1</junit.version>
40-
<jmh.version>1.33</jmh.version>
41-
<mbr.version>0.3.0.RELEASE</mbr.version>
42-
<logback.version>1.2.11</logback.version>
39+
<junit.version>5.13.4</junit.version>
40+
<jmh.version>1.37</jmh.version>
41+
<mbr.version>0.6.0.RELEASE</mbr.version>
42+
<logback.version>1.5.18</logback.version>
4343
<mockito.version>4.11.0</mockito.version>
4444
<mssql-jdbc.version>12.2.0.jre8</mssql-jdbc.version>
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
4747
<r2dbc-spi.version>1.0.0.RELEASE</r2dbc-spi.version>
48-
<r2dbc-pool.version>1.0.1.RELEASE</r2dbc-pool.version>
48+
<r2dbc-pool.version>1.0.2.RELEASE</r2dbc-pool.version>
4949
<reactor.version>2022.0.9</reactor.version>
50-
<spring-framework.version>5.3.29</spring-framework.version>
50+
<spring-framework.version>5.3.39</spring-framework.version>
5151
<testcontainers.version>1.18.3</testcontainers.version>
5252
</properties>
5353

src/test/java/io/r2dbc/mssql/client/ReactorNettyClientIntegrationTests.java

Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import io.r2dbc.mssql.message.token.SqlBatch;
2323
import io.r2dbc.mssql.util.IntegrationTestSupport;
2424
import io.r2dbc.spi.R2dbcNonTransientResourceException;
25+
import org.junit.jupiter.api.AfterEach;
2526
import org.junit.jupiter.api.BeforeEach;
2627
import org.junit.jupiter.api.Test;
2728
import org.springframework.util.ReflectionUtils;
@@ -54,18 +55,25 @@ class ReactorNettyClientIntegrationTests extends IntegrationTestSupport {
5455
ReflectionUtils.makeAccessible(CLIENT);
5556
}
5657

58+
private io.r2dbc.spi.Connection r2dbcConnection;
5759
private ReactorNettyClient client;
5860

5961
private Connection connection;
6062

6163
@BeforeEach
6264
void setUp() {
63-
this.client = (ReactorNettyClient) ReflectionUtils.getField(CLIENT, IntegrationTestSupport.connection);
65+
this.r2dbcConnection = connectionFactory.create().block();
66+
this.client = (ReactorNettyClient) ReflectionUtils.getField(CLIENT, this.r2dbcConnection);
6467
this.connection = (Connection) ReflectionUtils.getField(CONNECTION, this.client);
6568
}
6669

70+
@AfterEach
71+
void tearDown() {
72+
Mono.from(r2dbcConnection.close()).subscribe();
73+
}
74+
6775
@Test
68-
void disconnectedShouldRejectExchange() throws InterruptedException {
76+
void disconnectedShouldRejectExchange() {
6977

7078
Connection connection = (Connection) ReflectionUtils.getField(CONNECTION, this.client);
7179
connection.channel().close().awaitUninterruptibly();
@@ -99,29 +107,4 @@ void shouldCancelExchangeOnCloseFirstMessage() throws Exception {
99107
}
100108
}
101109

102-
@Test
103-
void shouldCancelExchangeOnCloseInFlight() throws Exception {
104-
105-
Connection connection = (Connection) ReflectionUtils.getField(CONNECTION, this.client);
106-
107-
SqlBatch batch = SqlBatch.create(0, this.client.getTransactionDescriptor(), "SELECT value FROM test");
108-
109-
Sinks.Many<ClientMessage> messages = Sinks.many().unicast().onBackpressureBuffer();
110-
Flux<Message> query = this.client.exchange(messages.asFlux(), message -> true);
111-
CompletableFuture<List<Message>> future = query.doOnNext(ignore -> {
112-
connection.channel().close();
113-
messages.tryEmitNext(batch);
114-
115-
}).collectList().toFuture();
116-
117-
messages.tryEmitNext(batch);
118-
119-
try {
120-
future.get(5, TimeUnit.SECONDS);
121-
fail("Expected MssqlConnectionClosedException");
122-
} catch (ExecutionException e) {
123-
assertThat(e).hasCauseInstanceOf(ReactorNettyClient.MssqlConnectionClosedException.class).hasMessageContaining("closed");
124-
}
125-
}
126-
127110
}

src/test/java/io/r2dbc/mssql/util/IntegrationTestSupport.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,7 @@
2929

3030
import java.util.function.Predicate;
3131

32-
import static io.r2dbc.spi.ConnectionFactoryOptions.DRIVER;
33-
import static io.r2dbc.spi.ConnectionFactoryOptions.HOST;
34-
import static io.r2dbc.spi.ConnectionFactoryOptions.PASSWORD;
35-
import static io.r2dbc.spi.ConnectionFactoryOptions.PORT;
36-
import static io.r2dbc.spi.ConnectionFactoryOptions.USER;
32+
import static io.r2dbc.spi.ConnectionFactoryOptions.*;
3733

3834
/**
3935
* Support class for integration tests.
@@ -79,6 +75,7 @@ void setUp() {
7975
@AfterAll
8076
static void afterAll() {
8177

78+
System.out.println("close");
8279
if (connection != null) {
8380
connection.close().subscribe();
8481
}

0 commit comments

Comments
 (0)