#159 - Polishing.
Update tests to work around known issues in type conversion and transaction synchronization.
This commit is contained in:
@@ -157,7 +157,7 @@ public abstract class AbstractDatabaseClientIntegrationTests extends R2dbcIntegr
|
||||
|
||||
DatabaseClient databaseClient = DatabaseClient.create(connectionFactory);
|
||||
|
||||
databaseClient.execute("SELECT id, name, manual FROM legoset WHERE name = :name or manual = :name") //
|
||||
databaseClient.execute("SELECT id, name, manual FROM legoset WHERE name = :name or name = :name") //
|
||||
.bind("name", "unknown").as(LegoSet.class) //
|
||||
.fetch().all() //
|
||||
.as(StepVerifier::create) //
|
||||
|
||||
@@ -145,12 +145,12 @@ public abstract class AbstractTransactionalDatabaseClientIntegrationTests extend
|
||||
@Test // gh-2
|
||||
public void executeInsertInManagedTransaction() {
|
||||
|
||||
Mono<Integer> integerFlux = databaseClient //
|
||||
Flux<Integer> integerFlux = databaseClient //
|
||||
.execute(getInsertIntoLegosetStatement()) //
|
||||
.bind(0, 42055) //
|
||||
.bind(1, "SCHAUFELRADBAGGER") //
|
||||
.bindNull(2, Integer.class) //
|
||||
.fetch().rowsUpdated().as(rxtx::transactional);
|
||||
.fetch().rowsUpdated().flux().as(rxtx::transactional);
|
||||
|
||||
integerFlux.as(StepVerifier::create) //
|
||||
.expectNext(1) //
|
||||
@@ -162,11 +162,11 @@ public abstract class AbstractTransactionalDatabaseClientIntegrationTests extend
|
||||
@Test // gh-2
|
||||
public void executeInsertInAutoCommitTransaction() {
|
||||
|
||||
Mono<Integer> integerFlux = databaseClient.execute(getInsertIntoLegosetStatement()) //
|
||||
Flux<Integer> integerFlux = databaseClient.execute(getInsertIntoLegosetStatement()) //
|
||||
.bind(0, 42055) //
|
||||
.bind(1, "SCHAUFELRADBAGGER") //
|
||||
.bindNull(2, Integer.class) //
|
||||
.fetch().rowsUpdated().as(rxtx::transactional);
|
||||
.fetch().rowsUpdated().flux().as(rxtx::transactional);
|
||||
|
||||
integerFlux.as(StepVerifier::create) //
|
||||
.expectNext(1) //
|
||||
|
||||
@@ -20,7 +20,7 @@ import io.r2dbc.spi.ConnectionFactory;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.junit.ClassRule;
|
||||
import org.springframework.data.r2dbc.core.DatabaseClient;
|
||||
|
||||
import org.springframework.data.r2dbc.testing.ExternalDatabase;
|
||||
import org.springframework.data.r2dbc.testing.SqlServerTestSupport;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user