Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/3.2' into 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfurmanski committed Sep 11, 2017
2 parents d0fbf9c + 163efbe commit 1fbf349
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,16 @@ public void shouldInvokeWhenCreditsBecomeAvailable() throws Exception
// given
Throttler throttler = new Throttler( 1000 );
Blocker blocker = new Blocker();

// when
Future<Integer> call1 = ecs.submit( () -> throttler.invoke( blocker, 1200 ) );
Future<Integer> call2 = ecs.submit( () -> throttler.invoke( blocker, 800 ) );

// then
assertEventually( null, blocker::count, equalTo( 1 ), 1, MINUTES );

// when
blocker.release( 1 );
Future<Integer> call2 = ecs.submit( () -> throttler.invoke( blocker, 800 ) );

// then
call1.get( 1, MINUTES );
Expand Down

0 comments on commit 1fbf349

Please sign in to comment.