Skip to content

Commit 0667f30

Browse files
committed
Ensure srv dns test runs on java 7+
JAVA-3251
1 parent 89ffdb5 commit 0667f30

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

driver-legacy/src/test/functional/com/mongodb/InitialDnsSeedlistDiscoveryTest.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,11 @@
4444

4545
import static com.mongodb.ClusterFixture.getSslSettings;
4646
import static com.mongodb.ClusterFixture.isDiscoverableReplicaSet;
47+
import static com.mongodb.ClusterFixture.isNotAtLeastJava7;
4748
import static org.junit.Assert.assertEquals;
4849
import static org.junit.Assert.assertTrue;
4950
import static org.junit.Assert.fail;
51+
import static org.junit.Assume.assumeFalse;
5052
import static org.junit.Assume.assumeTrue;
5153

5254
// See https://github.com/mongodb/specifications/tree/master/source/initial-dns-seedlist-discovery/tests
@@ -72,6 +74,8 @@ public InitialDnsSeedlistDiscoveryTest(final String filename, final String uri,
7274

7375
@Test
7476
public void shouldResolveTxtRecord() throws InterruptedException {
77+
assumeFalse(isNotAtLeastJava7());
78+
7579
if (isError) {
7680
MongoClient client = null;
7781
try {
@@ -131,6 +135,7 @@ public void clusterDescriptionChanged(final ClusterDescriptionChangedEvent event
131135

132136
@Test
133137
public void shouldDiscoverSrvRecord() throws InterruptedException {
138+
assumeFalse(isNotAtLeastJava7());
134139
if (seeds.isEmpty()) {
135140
return;
136141
}

0 commit comments

Comments
 (0)