Skip to content

Commit

Permalink
Update ReplicatedShardingTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
pjfanning committed Jan 30, 2025
1 parent bf76e89 commit e4fda5f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public Receive<Command> createReceive() {
private Behavior<Command> onForwardToRandom(ForwardToRandom forwardToRandom) {
Map<ReplicaId, EntityRef<MyReplicatedStringSet.Command>> refs =
replicatedSharding.getEntityRefsFor(forwardToRandom.entityId);
int chosenIdx = RandomNumberGenerator.get().nextInt(refs.size());
int chosenIdx = ThreadLocalRandom.current().nextInt(refs.size());
new ArrayList<>(refs.values()).get(chosenIdx).tell(forwardToRandom.message);
return this;
}
Expand Down

0 comments on commit e4fda5f

Please sign in to comment.