Skip to content
Snippets Groups Projects
Commit 1ff31ed0 authored by Sören Henning's avatar Sören Henning
Browse files

Fix bug of always sending the same message

parent 60187c25
No related branches found
No related tags found
No related merge requests found
Pipeline #928 passed with warnings
......@@ -98,9 +98,8 @@ public abstract class AbstractWorkloadGenerator<T>
LOGGER.info("Experiment is going to be executed for the specified duration...");
entities.forEach(entity -> {
final T message = entity.generateMessage();
final long initialDelay = random.nextInt(periodMs);
final Runnable task = () -> this.transport.transport(message);
final Runnable task = () -> this.transport.transport(entity.generateMessage());
this.executor.scheduleAtFixedRate(task, initialDelay, periodMs, TimeUnit.MILLISECONDS);
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment