Skip to content

Commit e3f2209

Browse files
author
Mathieu Gabelle
committed
log: add log to see what's happening on the CI
1 parent 295e51c commit e3f2209

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

plugin-debezium-mysql/src/main/java/io/kestra/plugin/debezium/mysql/Trigger.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ public Optional<Execution> evaluate(ConditionContext conditionContext, TriggerCo
8383
.build();
8484
AbstractDebeziumTask.Output run = task.run(runContext);
8585

86-
if (logger.isDebugEnabled()) {
86+
//TODO remove
87+
//if (logger.isDebugEnabled()) {
8788
logger.debug("Found '{}' messages", run.getSize());
88-
}
89+
//}
8990

9091
if (run.getSize() == 0) {
9192
return Optional.empty();

plugin-debezium-mysql/src/test/java/io/kestra/plugin/debezium/mysql/CaptureTest.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ protected void init() throws IOException, URISyntaxException {
6666
}
6767

6868
@Test
69-
void flow() throws TimeoutException, QueueException, SQLException, IOException, URISyntaxException {
69+
void flow() throws TimeoutException, QueueException, SQLException, IOException, URISyntaxException, InterruptedException {
7070
// init database
7171
executeSqlScript("scripts/mysql.sql");
7272

73+
Thread.sleep(3000);
74+
7375
Execution execution = runnerUtils.runOne(
7476
null,
7577
"io.kestra.tests",
@@ -86,12 +88,13 @@ void flow() throws TimeoutException, QueueException, SQLException, IOException,
8688

8789

8890
Map<String, Object> output = execution.getTaskRunList().getFirst().getOutputs();
91+
Map<String, URI> uris = (Map<String, URI>) output.get("uris");
8992

90-
assertThat(output.get("size"), is(5));
93+
System.out.println(output.get("size"));
94+
System.out.println(uris);
9195

92-
List<Map<String, Object>> events = new ArrayList<>();
93-
Map<String, URI> uris = (Map<String, URI>) output.get("uris");
9496

97+
List<Map<String, Object>> events = new ArrayList<>();
9598
FileSerde.reader(new BufferedReader(new InputStreamReader(storageInterface.get(null, null, uris.get("kestra.events")))), r -> events.add((Map<String, Object>) r));
9699

97100
IOUtils.toString(storageInterface.get(null, null, uris.get("kestra.events")), StandardCharsets.UTF_8);

plugin-debezium-mysql/src/test/resources/flows/capture-mysql.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@ tasks:
2020
maxRecords: 5
2121
includedTables:
2222
- kestra.events
23+
24+
- id: log_result
25+
type: io.kestra.plugin.core.log.Log
26+
level: DEBUG
27+
message:
28+
- "Size : {{ outputs.capture-mysql.size }}"
29+
- "URIs : {{ outputs.capture-mysql.uris }}"

0 commit comments

Comments
 (0)