File tree Expand file tree Collapse file tree
src/main/java/couchbase/loadgen Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,9 +451,22 @@ else if(ops < dg.ws.ops/dg.ws.workers && flag) {
451451
452452 @ Override
453453 public void run () {
454- if (this .sdkClientPool != null )
455- this .sdk = this .sdkClientPool .get_client_for_bucket (
456- this .bucket_name , this .scope , this .collection );
454+ if (this .sdkClientPool != null ) {
455+ while (this .sdk == null ) {
456+ this .sdk = this .sdkClientPool .get_client_for_bucket (
457+ this .bucket_name , this .scope , this .collection );
458+ if (this .sdk == null ) {
459+ try {
460+ TimeUnit .SECONDS .sleep (1 );
461+ } catch (InterruptedException e ) {
462+ logger .error ("Interrupted while waiting for SDK client" , e );
463+ Thread .currentThread ().interrupt ();
464+ this .result = false ;
465+ return ;
466+ }
467+ }
468+ }
469+ }
457470 try {
458471 this .actual_run ();
459472 }
You can’t perform that action at this time.
0 commit comments