Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ public void testBasicAlterPipe() throws Exception {

// Alter pipe (replace)
statement.execute(
"alter pipe a2b replace source ('capture.table'='true','''source'='iotdb-source', 'table-name'='test','database-name'='test')");
"alter pipe a2b replace source ('capture.table'='true','source'='iotdb-source',"
+ "'''source'='do-nothing-source','table-name'='test','database-name'='test')");

// Show pipe
{
Expand All @@ -175,6 +176,7 @@ public void testBasicAlterPipe() throws Exception {
Assert.assertEquals("STOPPED", showPipeResult.get(0).state);
// check configurations
Assert.assertTrue(showPipeResult.get(0).pipeExtractor.contains("source=iotdb-source"));
Assert.assertFalse(showPipeResult.get(0).pipeExtractor.contains("'source="));
Assert.assertTrue(showPipeResult.get(0).pipeExtractor.contains("database-name=test"));
Assert.assertTrue(showPipeResult.get(0).pipeExtractor.contains("table-name=test"));
Assert.assertFalse(showPipeResult.get(0).pipeExtractor.contains("mode.streaming=true"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void testLifeCycleLogMode() throws Exception {

sourceAttributes.put("capture.table", "true");
sourceAttributes.put("__system.sql-dialect", "table");
sourceAttributes.put("source.mode", "forced-log");
sourceAttributes.put("source.realtime.mode", "forced-log");
sourceAttributes.put("user", "root");

sinkAttributes.put("sink", "iotdb-thrift-sink");
Expand Down Expand Up @@ -324,7 +324,7 @@ public void testLifeCycleHybridMode() throws Exception {

sourceAttributes.put("capture.table", "true");
sourceAttributes.put("__system.sql-dialect", "table");
sourceAttributes.put("source.mode", "hybrid");
sourceAttributes.put("source.realtime.mode", "hybrid");
sourceAttributes.put("user", "root");

sinkAttributes.put("sink", "iotdb-thrift-sink");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,10 @@ public void testZstdCompressorLevel() throws Exception {
receiverIp,
receiverPort));
fail();
} catch (SQLException e) {
// Make sure the error message in IoTDBConnector.java is returned
} catch (SQLException failure) {
Assert.assertEquals(TSStatusCode.PIPE_ERROR.getStatusCode(), failure.getErrorCode());
Assert.assertTrue(
e.getMessage().contains("Zstd compression level should be in the range"));
failure.getMessage(), failure.getMessage().contains("compressor.zstd.level"));
}

try {
Expand All @@ -358,10 +358,10 @@ public void testZstdCompressorLevel() throws Exception {
receiverIp,
receiverPort));
fail();
} catch (SQLException e) {
// Make sure the error message in IoTDBConnector.java is returned
} catch (SQLException failure) {
Assert.assertEquals(TSStatusCode.PIPE_ERROR.getStatusCode(), failure.getErrorCode());
Assert.assertTrue(
e.getMessage().contains("Zstd compression level should be in the range"));
failure.getMessage(), failure.getMessage().contains("compressor.zstd.level"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ public void testLifeCycleLogMode() throws Exception {
final Map<String, String> processorAttributes = new HashMap<>();
final Map<String, String> sinkAttributes = new HashMap<>();

sourceAttributes.put("source.mode", "log");
sourceAttributes.put("source.realtime.mode", "log");
sourceAttributes.put("user", "root");

sinkAttributes.put("sink", "iotdb-thrift-sink");
Expand Down Expand Up @@ -380,7 +380,7 @@ public void testLifeCycleFileMode() throws Exception {
final Map<String, String> processorAttributes = new HashMap<>();
final Map<String, String> sinkAttributes = new HashMap<>();

sourceAttributes.put("source.mode", "file");
sourceAttributes.put("source.realtime.mode", "file");
sourceAttributes.put("user", "root");

sinkAttributes.put("sink", "iotdb-thrift-sink");
Expand Down Expand Up @@ -446,7 +446,7 @@ public void testLifeCycleHybridMode() throws Exception {
final Map<String, String> processorAttributes = new HashMap<>();
final Map<String, String> sinkAttributes = new HashMap<>();

sourceAttributes.put("source.mode", "hybrid");
sourceAttributes.put("source.realtime.mode", "hybrid");
sourceAttributes.put("user", "root");

sinkAttributes.put("sink", "iotdb-thrift-sink");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,10 @@ private void assertCreateZstdPipeFailed(
try {
createZstdPipe(statement, pipeName, sourcePattern, zstdLevel, receiverIp, receiverPort);
fail();
} catch (final SQLException e) {
Assert.assertTrue(e.getMessage().contains("Zstd compression level should be in the range"));
} catch (final SQLException failure) {
Assert.assertEquals(TSStatusCode.PIPE_ERROR.getStatusCode(), failure.getErrorCode());
Assert.assertTrue(
failure.getMessage(), failure.getMessage().contains("compressor.zstd.level"));
}
}

Expand Down
Loading