2222import com .mongodb .connection .AsyncConnection ;
2323import org .junit .After ;
2424import org .junit .Before ;
25+ import org .junit .Ignore ;
2526import org .junit .Test ;
2627import org .junit .experimental .categories .Category ;
2728
3738import static org .junit .Assert .assertThat ;
3839
3940@ Category (ReplicaSet .class )
41+ @ Ignore // Ignoring, since this is test of a test class
4042public class AsyncSingleConnectionBindingTest {
4143 private AsyncSingleConnectionBinding binding ;
4244
@@ -86,7 +88,7 @@ public void shouldHaveTheSameConnectionForReadsAndWritesWithPrimaryReadPreferenc
8688 @ Test
8789 public void shouldNotDevourAllConnections () throws Throwable {
8890 for (int i = 0 ; i < 250 ; i ++) {
89- AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), 1 , SECONDS );
91+ AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), ClusterFixture . TIMEOUT , SECONDS );
9092 getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
9193 getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
9294 getAndReleaseConnectionSourceAndConnection (getWriteConnectionSource (binding ));
@@ -99,7 +101,8 @@ public void shouldNotDevourAllConnections() throws Throwable {
99101
100102 @ Test
101103 public void shouldHaveTheDifferentConnectionForReadsAndWritesWithNonPrimaryReadPreference () throws Throwable {
102- AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), secondary (), 1 , SECONDS );
104+ AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), secondary (), ClusterFixture .TIMEOUT ,
105+ SECONDS );
103106 AsyncConnectionSource writeSource = getWriteConnectionSource (binding );
104107 AsyncConnection writeConnection = getConnection (writeSource );
105108
@@ -117,7 +120,8 @@ public void shouldHaveTheDifferentConnectionForReadsAndWritesWithNonPrimaryReadP
117120 @ Test
118121 public void shouldNotDevourAllConnectionsWhenUsingNonPrimaryReadPreference () throws Throwable {
119122 for (int i = 0 ; i < 500 ; i ++) {
120- AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), secondary (), 1 , SECONDS );
123+ AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), secondary (), ClusterFixture .TIMEOUT ,
124+ SECONDS );
121125 getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
122126 getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
123127 getAndReleaseConnectionSourceAndConnection (getWriteConnectionSource (binding ));
0 commit comments