@@ -293,6 +293,36 @@ public void testDeadLetterQueue_badColumnType() {
293
293
294
294
}
295
295
296
+ @ Test
297
+ public void testbadColumnType_noDLQ () {
298
+ connect .kafka ().createTopic (topicName , 1 );
299
+ Map <String , String > props = ConnectTestUtils .baseConnectorProps (questDBContainer , topicName , true );
300
+ props .put ("value.converter.schemas.enable" , "false" );
301
+ connect .configureConnector (ConnectTestUtils .CONNECTOR_NAME , props );
302
+ ConnectTestUtils .assertConnectorTaskRunningEventually (connect );
303
+
304
+ QuestDBUtils .assertSql (
305
+ "{\" ddl\" :\" OK\" }" ,
306
+ "create table " + topicName + " (firstname string, lastname string, age int, id uuid, ts timestamp) timestamp(ts) partition by day wal" ,
307
+ httpPort ,
308
+ QuestDBUtils .Endpoint .EXEC );
309
+
310
+ String goodRecordA = "{\" firstname\" :\" John\" ,\" lastname\" :\" Doe\" ,\" age\" :42,\" id\" :\" ad956a45-a55b-441e-b80d-023a2bf5d041\" }" ;
311
+ String goodRecordB = "{\" firstname\" :\" John\" ,\" lastname\" :\" Doe\" ,\" age\" :42,\" id\" :\" ad956a45-a55b-441e-b80d-023a2bf5d042\" }" ;
312
+ String goodRecordC = "{\" firstname\" :\" John\" ,\" lastname\" :\" Doe\" ,\" age\" :42,\" id\" :\" ad956a45-a55b-441e-b80d-023a2bf5d043\" }" ;
313
+ String badRecordA = "{\" firstname\" :\" John\" ,\" lastname\" :\" Doe\" ,\" age\" :42,\" id\" :\" Invalid UUID\" }" ;
314
+ String badRecordB = "{\" firstname\" :\" John\" ,\" lastname\" :\" Doe\" ,\" age\" :\" not a number\" ,\" id\" :\" ad956a45-a55b-441e-b80d-023a2bf5d041\" }" ;
315
+
316
+ // interleave good and bad records
317
+ connect .kafka ().produce (topicName , "key" , goodRecordA );
318
+ connect .kafka ().produce (topicName , "key" , badRecordA );
319
+ connect .kafka ().produce (topicName , "key" , goodRecordB );
320
+ connect .kafka ().produce (topicName , "key" , badRecordB );
321
+ connect .kafka ().produce (topicName , "key" , goodRecordC );
322
+
323
+ ConnectTestUtils .assertConnectorTaskStateEventually (connect , AbstractStatus .State .FAILED );
324
+ }
325
+
296
326
@ ParameterizedTest
297
327
@ ValueSource (booleans = {true , false })
298
328
public void testSymbol (boolean useHttp ) {
0 commit comments