Skip to content

Commit d5fb682

Browse files
committed
Added @ignore for tests of binding implementations that used to be in production but are now only in test.
1 parent 4d9c1a6 commit d5fb682

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

driver-core/src/test/functional/com/mongodb/binding/AsyncSingleConnectionBindingTest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.mongodb.connection.AsyncConnection;
2323
import org.junit.After;
2424
import org.junit.Before;
25+
import org.junit.Ignore;
2526
import org.junit.Test;
2627
import org.junit.experimental.categories.Category;
2728

@@ -37,6 +38,7 @@
3738
import static org.junit.Assert.assertThat;
3839

3940
@Category(ReplicaSet.class)
41+
@Ignore // Ignoring, since this is test of a test class
4042
public 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));

driver-core/src/test/functional/com/mongodb/binding/SingleConnectionBindingTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.mongodb.connection.Connection;
2121
import org.junit.After;
2222
import org.junit.Before;
23+
import org.junit.Ignore;
2324
import org.junit.Test;
2425
import org.junit.experimental.categories.Category;
2526

@@ -31,6 +32,7 @@
3132
import static org.junit.Assert.assertThat;
3233

3334
@Category(ReplicaSet.class)
35+
@Ignore // Ignoring, since this is test of a test class
3436
public class SingleConnectionBindingTest {
3537
private SingleConnectionBinding binding;
3638

0 commit comments

Comments
 (0)