@@ -75,7 +75,7 @@ public ServerSelectionSelectionTest(final String description, final BsonDocument
75
75
@ Test
76
76
public void shouldPassAllOutcomes () {
77
77
// skip this test because the driver prohibits maxStaleness or tagSets with mode of primary at a much lower level
78
- assumeTrue (!description .equals ("max-staleness/server_selection/ ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json" ));
78
+ assumeTrue (!description .equals ("max-staleness/ReplicaSetWithPrimary/MaxStalenessWithModePrimary.json" ));
79
79
80
80
ServerSelector serverSelector = null ;
81
81
List <ServerDescription > suitableServers = buildServerDescriptions (definition .getArray ("suitable_servers" , new BsonArray ()));
@@ -105,16 +105,21 @@ public void shouldPassAllOutcomes() {
105
105
public static Collection <Object []> data () throws URISyntaxException , IOException {
106
106
List <Object []> data = new ArrayList <Object []>();
107
107
for (File file : JsonPoweredTestHelper .getTestFiles ("/server-selection/server_selection" )) {
108
- data .add (new Object []{getDescription ( "server-selection/server_selection" , file ), JsonPoweredTestHelper .getTestDocument (file )});
108
+ data .add (new Object []{getServerSelectionTestDescription ( file ), JsonPoweredTestHelper .getTestDocument (file )});
109
109
}
110
110
for (File file : JsonPoweredTestHelper .getTestFiles ("/max-staleness/server_selection" )) {
111
- data .add (new Object []{getDescription ( "max-staleness/server_selection" , file ), JsonPoweredTestHelper .getTestDocument (file )});
111
+ data .add (new Object []{getMaxStalenessTestDescription ( file ), JsonPoweredTestHelper .getTestDocument (file )});
112
112
}
113
113
return data ;
114
114
}
115
115
116
- private static String getDescription (final String root , final File file ) {
117
- return root + "/" + file .getParentFile ().getName () + "/" + file .getName ();
116
+ private static String getServerSelectionTestDescription (final File file ) {
117
+ return "server-selection" + "/" + file .getParentFile ().getParentFile ().getName () + "/" + file .getParentFile ().getName () + "/"
118
+ + file .getName ();
119
+ }
120
+
121
+ private static String getMaxStalenessTestDescription (final File file ) {
122
+ return "max-staleness" + "/" + file .getParentFile ().getName () + "/" + file .getName ();
118
123
}
119
124
120
125
public static ClusterDescription buildClusterDescription (final BsonDocument topologyDescription ,
0 commit comments