Skip to content

Commit 5f7ab59

Browse files
committed
Ignoring MongoClient.isLocked test for sharded clusters.
JAVA-1886
1 parent f7bb1d7 commit 5f7ab59

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

driver/src/test/functional/com/mongodb/MongoMethodsTest.java

+5
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@
2020

2121
import java.net.UnknownHostException;
2222

23+
import static com.mongodb.ClusterFixture.clusterIsType;
24+
import static com.mongodb.connection.ClusterType.SHARDED;
2325
import static org.hamcrest.CoreMatchers.hasItems;
2426
import static org.junit.Assert.assertFalse;
2527
import static org.junit.Assert.assertThat;
2628
import static org.junit.Assert.assertTrue;
29+
import static org.junit.Assume.assumeFalse;
2730

2831
public class MongoMethodsTest extends DatabaseTestCase {
2932
@Test
@@ -42,6 +45,8 @@ public void shouldGetDatabaseNames() throws UnknownHostException {
4245

4346
@Test
4447
public void shouldLockAndUnlock() {
48+
assumeFalse(clusterIsType(SHARDED));
49+
4550
assertFalse(getClient().isLocked());
4651

4752
getClient().fsyncAndLock();

0 commit comments

Comments
 (0)