Skip to content

Commit ef6d84e

Browse files
Resolve some TODOs in test code
1 parent f90cd92 commit ef6d84e

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

src/test/java/oracle/r2dbc/impl/OracleReadableMetadataImplTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,12 @@ public void testCharacterTypes() {
9494

9595
// Expect CLOB and String to map.
9696
verifyColumnMetadata(
97-
connection, "CLOB", JDBCType.CLOB,
98-
SqlTypeMap.toR2dbcType(JDBCType.CLOB),/* TODO: R2dbcType.CLOB,*/
97+
connection, "CLOB", JDBCType.CLOB, R2dbcType.CLOB,
9998
null, null, String.class, "test");
10099

101100
// Expect NCLOB and String to map
102101
verifyColumnMetadata(
103-
connection, "NCLOB", JDBCType.NCLOB,
104-
SqlTypeMap.toR2dbcType(JDBCType.NCLOB),/* TODO: R2dbcType.NCLOB,*/
102+
connection, "NCLOB", JDBCType.NCLOB, R2dbcType.NCLOB,
105103
null, null, String.class, "test");
106104

107105
// Expect LONG and String to map.

src/test/java/oracle/r2dbc/impl/OracleResultImplTest.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ public void testMap() {
228228
() -> insertResult0.map((row, metadata) -> "unexpected"));
229229

230230
// Expect row data publisher to reject multiple subscribers
231-
// TODO: Is it necessary to verify this for an empty publisher?
232-
// awaitError(IllegalStateException.class, insertRowPublisher0);
231+
awaitError(IllegalStateException.class, insertRowPublisher0);
233232

234233
Result insertResult1 = insertResults.next();
235234
Publisher<Object> insertRowPublisher1 =
@@ -243,8 +242,7 @@ public void testMap() {
243242
() -> insertResult1.map((row, metadata) -> "unexpected"));
244243

245244
// Expect row data publisher to reject multiple subscribers
246-
// TODO: Is it necessary to verify this for an empty publisher?
247-
//awaitError(IllegalStateException.class, insertRowPublisher1);
245+
awaitError(IllegalStateException.class, insertRowPublisher1);
248246

249247
// Expect no rows from UPDATE
250248
consumeOne(connection.createStatement(
@@ -262,8 +260,7 @@ public void testMap() {
262260
assertThrows(IllegalStateException.class, updateResult::getRowsUpdated);
263261

264262
// Expect row data publisher to reject multiple subscribers
265-
// TODO: Is it necessary to verify this for an empty publisher?
266-
// awaitError(IllegalStateException.class, updateRowPublisher);
263+
awaitError(IllegalStateException.class, updateRowPublisher);
267264
});
268265

269266
// Expect no rows from SELECT of zero rows
@@ -376,14 +373,10 @@ public void testMap() {
376373
() -> deleteResult.map((row, metadata) -> "unexpected"));
377374
assertThrows(IllegalStateException.class, deleteResult::getRowsUpdated);
378375

379-
return Mono.from(deleteRowPublisher);
380-
// TODO: Is it necessary to verify this for an empty publisher?
381-
/*
376+
return Mono.from(deleteRowPublisher)
382377
.doOnTerminate(() ->
383378
// Expect row data publisher to reject multiple subscribers
384379
awaitError(IllegalStateException.class, deleteRowPublisher));
385-
386-
*/
387380
}));
388381
}
389382
finally {

0 commit comments

Comments
 (0)