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

Fix bug of always sending the same message

parent 181374e4
No related branches found
No related tags found
No related merge requests found
...@@ -98,9 +98,8 @@ public abstract class AbstractWorkloadGenerator<T> ...@@ -98,9 +98,8 @@ public abstract class AbstractWorkloadGenerator<T>
LOGGER.info("Experiment is going to be executed for the specified duration..."); LOGGER.info("Experiment is going to be executed for the specified duration...");
entities.forEach(entity -> { entities.forEach(entity -> {
final T message = entity.generateMessage();
final long initialDelay = random.nextInt(periodMs); 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); 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