Skip to content

Commit b49b1fc

Browse files
committed
Adapt test to avoid failure jenkins jobs. Now with the fix on release shouldn't happened anymore
1 parent 2099b31 commit b49b1fc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

httpclient5/src/test/java/org/apache/hc/client5/http/impl/nio/H2SharingConnPoolTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,11 @@ void testReleaseNonReusableNotInCacheReturnedToPool() throws Exception {
371371
return null;
372372
}).when(connPool).release(Mockito.eq(poolEntry), Mockito.anyBoolean());
373373

374-
h2SharingPool.release(poolEntry, false);
375374
// for reproduce https://issues.apache.org/jira/browse/HTTPCLIENT-2379
376-
Assertions.assertThrows(IllegalStateException.class, () -> h2SharingPool.release(poolEntry, false));
375+
h2SharingPool.release(poolEntry, false);
376+
h2SharingPool.release(poolEntry, false);
377+
h2SharingPool.release(poolEntry, false);
378+
Mockito.verify(connPool).release(Mockito.same(poolEntry),Mockito.eq(false));
377379
}
378380

379381
@Test

0 commit comments

Comments
 (0)