Skip to content

Commit b6002a5

Browse files
committed
added test coverage for app.java and fixed random to be thread safe #2973
1 parent 54d7396 commit b6002a5

File tree

1 file changed

+1
-0
lines changed
  • rate-limiting-pattern/src/main/java/com/iluwatar/rate/limiting/pattern

1 file changed

+1
-0
lines changed

rate-limiting-pattern/src/main/java/com/iluwatar/rate/limiting/pattern/App.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ static Runnable createClientTask(
106106
String[] operations = {
107107
"GetObject", "PutObject", "Query", "Scan", "PutItem", "Invoke", "ListFunctions"
108108
};
109+
// Safe: ThreadLocalRandom is used per-thread for concurrent simulation
109110
ThreadLocalRandom random = ThreadLocalRandom.current();
110111

111112
while (running.get() && !Thread.currentThread().isInterrupted()) {

0 commit comments

Comments
 (0)