|
14 | 14 | import static org.junit.jupiter.api.Assertions.assertThrows;
|
15 | 15 | import static org.junit.jupiter.api.Assertions.assertTrue;
|
16 | 16 | import static org.junit.jupiter.api.Assertions.fail;
|
| 17 | +import static org.junit.jupiter.api.Assumptions.assumeFalse; |
17 | 18 | import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
18 | 19 |
|
19 | 20 | import com.fasterxml.jackson.databind.JsonNode;
|
|
33 | 34 | import java.util.stream.Stream;
|
34 | 35 | import org.apache.commons.lang3.tuple.Pair;
|
35 | 36 | import org.junit.jupiter.api.AfterEach;
|
| 37 | +import org.junit.jupiter.api.Assumptions; |
36 | 38 | import org.junit.jupiter.api.BeforeEach;
|
37 | 39 | import org.junit.jupiter.api.Test;
|
38 | 40 | import org.junit.jupiter.api.parallel.Execution;
|
@@ -433,6 +435,21 @@ public void allTypes() throws Exception {
|
433 | 435 | assertFalse(destinationHandler.isFinalTableEmpty(streamId), "Final table should not be empty after T+D");
|
434 | 436 | }
|
435 | 437 |
|
| 438 | + @Test |
| 439 | + public void allTypesSafeCastUnsupported() throws Exception { |
| 440 | + assumeFalse(supportsSafeCast(), "Skipping test because this connector supports safe casting"); |
| 441 | + |
| 442 | + createRawTable(streamId); |
| 443 | + createFinalTable(incrementalDedupStream, ""); |
| 444 | + insertRawTableRecords( |
| 445 | + streamId, |
| 446 | + BaseTypingDedupingTest.readRecords("sqlgenerator/alltypes_inputrecords.jsonl")); |
| 447 | + |
| 448 | + assertThrows( |
| 449 | + Exception.class, |
| 450 | + () -> TypeAndDedupeTransaction.executeTypeAndDedupe(generator, destinationHandler, incrementalDedupStream, Optional.empty(), "")); |
| 451 | + } |
| 452 | + |
436 | 453 | /**
|
437 | 454 | * Run a basic test to verify that we don't throw an exception on basic data values.
|
438 | 455 | */
|
|
0 commit comments