File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
ycsb-mongodb/core/src/main/java/site/ycsb Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,16 @@ public void run() {
5151 System .err .println ("Maximum time elapsed. Requesting stop for the workload." );
5252 workload .requestStop ();
5353 System .err .println ("Stop requested for workload. Now Joining!" );
54+ long startTime = System .currentTimeMillis ();
5455 for (Thread t : threads ) {
5556 while (t .isAlive ()) {
5657 try {
5758 t .join (waitTimeOutInMS );
59+
60+ long elapsedTime = System .currentTimeMillis () - startTime ;
61+ if (elapsedTime > 3 * maxExecutionTime * 1000 ) {
62+ System .exit (1 );
63+ }
5864 if (t .isAlive ()) {
5965 System .out .println ("Still waiting for thread " + t .getName () + " to complete. " +
6066 "Workload status: " + workload .isStopRequested ());
You can’t perform that action at this time.
0 commit comments