22
22
import com .mongodb .connection .AsyncConnection ;
23
23
import org .junit .After ;
24
24
import org .junit .Before ;
25
+ import org .junit .Ignore ;
25
26
import org .junit .Test ;
26
27
import org .junit .experimental .categories .Category ;
27
28
37
38
import static org .junit .Assert .assertThat ;
38
39
39
40
@ Category (ReplicaSet .class )
41
+ @ Ignore // Ignoring, since this is test of a test class
40
42
public class AsyncSingleConnectionBindingTest {
41
43
private AsyncSingleConnectionBinding binding ;
42
44
@@ -86,7 +88,7 @@ public void shouldHaveTheSameConnectionForReadsAndWritesWithPrimaryReadPreferenc
86
88
@ Test
87
89
public void shouldNotDevourAllConnections () throws Throwable {
88
90
for (int i = 0 ; i < 250 ; i ++) {
89
- AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), 1 , SECONDS );
91
+ AsyncSingleConnectionBinding binding = new AsyncSingleConnectionBinding (getAsyncCluster (), ClusterFixture . TIMEOUT , SECONDS );
90
92
getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
91
93
getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
92
94
getAndReleaseConnectionSourceAndConnection (getWriteConnectionSource (binding ));
@@ -99,7 +101,8 @@ public void shouldNotDevourAllConnections() throws Throwable {
99
101
100
102
@ Test
101
103
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 );
103
106
AsyncConnectionSource writeSource = getWriteConnectionSource (binding );
104
107
AsyncConnection writeConnection = getConnection (writeSource );
105
108
@@ -117,7 +120,8 @@ public void shouldHaveTheDifferentConnectionForReadsAndWritesWithNonPrimaryReadP
117
120
@ Test
118
121
public void shouldNotDevourAllConnectionsWhenUsingNonPrimaryReadPreference () throws Throwable {
119
122
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 );
121
125
getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
122
126
getAndReleaseConnectionSourceAndConnection (getReadConnectionSource (binding ));
123
127
getAndReleaseConnectionSourceAndConnection (getWriteConnectionSource (binding ));
0 commit comments