From 7dec5c6d2a8341d0932f0582ef2c4be9c87b9112 Mon Sep 17 00:00:00 2001 From: Julien Ruaux Date: Tue, 11 Jul 2023 00:36:33 -0700 Subject: [PATCH] test: added wait for reader and writer --- .../src/test/java/com/redis/riot/cli/AbstractTests.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/riot/src/test/java/com/redis/riot/cli/AbstractTests.java b/plugins/riot/src/test/java/com/redis/riot/cli/AbstractTests.java index c86ffe35a..deea76a77 100644 --- a/plugins/riot/src/test/java/com/redis/riot/cli/AbstractTests.java +++ b/plugins/riot/src/test/java/com/redis/riot/cli/AbstractTests.java @@ -200,7 +200,14 @@ protected JobExecution run(String name, int chunkSize, ItemReader reader, throws JobExecutionException { SimpleStepBuilder step = step(name, chunkSize, reader, writer); Job job = jobBuilderFactory.get(name).start(step.build()).build(); - return jobLauncher.run(job, new JobParameters()); + JobExecution execution = jobLauncher.run(job, new JobParameters()); + awaitClosed(reader); + awaitClosed(writer); + return execution; + } + + private void awaitClosed(Object object) { + } protected String id() {