diff --git a/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedCrudTest.java b/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedCrudTest.java index dae57b323a6..410c6b9e0e9 100644 --- a/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedCrudTest.java +++ b/driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedCrudTest.java @@ -25,6 +25,8 @@ import java.net.URISyntaxException; import java.util.Collection; +import static com.mongodb.ClusterFixture.isDiscoverableReplicaSet; +import static com.mongodb.ClusterFixture.serverVersionAtLeast; import static org.junit.Assume.assumeFalse; public class UnifiedCrudTest extends UnifiedSyncTest { @@ -49,6 +51,10 @@ public static void customSkips(final String fileDescription, final String testDe assumeFalse(testDescription.equals("Unacknowledged findOneAndUpdate with hint document on 4.4+ server")); assumeFalse(testDescription.equals("Unacknowledged findOneAndDelete with hint string on 4.4+ server")); assumeFalse(testDescription.equals("Unacknowledged findOneAndDelete with hint document on 4.4+ server")); + if (isDiscoverableReplicaSet() && serverVersionAtLeast(8, 0)) { + assumeFalse(testDescription.equals("Aggregate with $out includes read preference for 5.0+ server")); + assumeFalse(testDescription.equals("Database-level aggregate with $out includes read preference for 5.0+ server")); + } } @Parameterized.Parameters(name = "{0}: {1}")