@@ -210,6 +210,92 @@ public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContex
210
210
}
211
211
212
212
if (!excludeAurora ) {
213
+ if (!excludeMysqlEngine && !excludePython38 ) {
214
+ if (numInstances == null || numInstances == 5 ) {
215
+ resultContextList .add (
216
+ getEnvironment (
217
+ new TestEnvironmentRequest (
218
+ DatabaseEngine .MYSQL ,
219
+ DatabaseInstances .MULTI_INSTANCE ,
220
+ 5 ,
221
+ DatabaseEngineDeployment .AURORA ,
222
+ TargetPythonVersion .PYTHON_3_8 ,
223
+ TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
224
+ excludeFailover ? null : TestEnvironmentFeatures .FAILOVER_SUPPORTED ,
225
+ TestEnvironmentFeatures .AWS_CREDENTIALS_ENABLED ,
226
+ excludeIam ? null : TestEnvironmentFeatures .IAM ,
227
+ excludeSecretsManager ? null : TestEnvironmentFeatures .SECRETS_MANAGER ,
228
+ excludePerformance ? null : TestEnvironmentFeatures .PERFORMANCE ,
229
+ excludeMysqlDriver ? TestEnvironmentFeatures .SKIP_MYSQL_DRIVER_TESTS : null ,
230
+ excludePgDriver ? TestEnvironmentFeatures .SKIP_PG_DRIVER_TESTS : null ,
231
+ testAutoscalingOnly ? TestEnvironmentFeatures .RUN_AUTOSCALING_TESTS_ONLY : null )));
232
+ }
233
+
234
+ if (numInstances == null || numInstances == 2 ) {
235
+ // Tests for IAM, SECRETS_MANAGER and PERFORMANCE are covered by
236
+ // cluster configuration above, so it's safe to skip these tests for configurations below.
237
+ // The main goal of the following cluster configurations is to check failover.
238
+ resultContextList .add (
239
+ getEnvironment (
240
+ new TestEnvironmentRequest (
241
+ DatabaseEngine .MYSQL ,
242
+ DatabaseInstances .MULTI_INSTANCE ,
243
+ 2 ,
244
+ DatabaseEngineDeployment .AURORA ,
245
+ TargetPythonVersion .PYTHON_3_8 ,
246
+ TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
247
+ excludeFailover ? null : TestEnvironmentFeatures .FAILOVER_SUPPORTED ,
248
+ TestEnvironmentFeatures .AWS_CREDENTIALS_ENABLED ,
249
+ excludeMysqlDriver ? TestEnvironmentFeatures .SKIP_MYSQL_DRIVER_TESTS : null ,
250
+ excludePgDriver ? TestEnvironmentFeatures .SKIP_PG_DRIVER_TESTS : null ,
251
+ testAutoscalingOnly ? TestEnvironmentFeatures .RUN_AUTOSCALING_TESTS_ONLY : null )));
252
+ }
253
+ }
254
+
255
+ if (!excludePgEngine && !excludePython38 ) {
256
+ if (numInstances == null || numInstances == 5 ) {
257
+ resultContextList .add (
258
+ getEnvironment (
259
+ new TestEnvironmentRequest (
260
+ DatabaseEngine .PG ,
261
+ DatabaseInstances .MULTI_INSTANCE ,
262
+ 5 ,
263
+ DatabaseEngineDeployment .AURORA ,
264
+ TargetPythonVersion .PYTHON_3_8 ,
265
+ TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
266
+ TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ,
267
+ excludeFailover ? null : TestEnvironmentFeatures .FAILOVER_SUPPORTED ,
268
+ TestEnvironmentFeatures .AWS_CREDENTIALS_ENABLED ,
269
+ excludeIam ? null : TestEnvironmentFeatures .IAM ,
270
+ excludeSecretsManager ? null : TestEnvironmentFeatures .SECRETS_MANAGER ,
271
+ excludePerformance ? null : TestEnvironmentFeatures .PERFORMANCE ,
272
+ excludeMysqlDriver ? TestEnvironmentFeatures .SKIP_MYSQL_DRIVER_TESTS : null ,
273
+ excludePgDriver ? TestEnvironmentFeatures .SKIP_PG_DRIVER_TESTS : null ,
274
+ testAutoscalingOnly ? TestEnvironmentFeatures .RUN_AUTOSCALING_TESTS_ONLY : null )));
275
+ }
276
+
277
+ if (numInstances == null || numInstances == 2 ) {
278
+ // Tests for IAM, SECRETS_MANAGER and PERFORMANCE are covered by
279
+ // cluster configuration above, so it's safe to skip these tests for configurations below.
280
+ // The main goal of the following cluster configurations is to check failover.
281
+ resultContextList .add (
282
+ getEnvironment (
283
+ new TestEnvironmentRequest (
284
+ DatabaseEngine .PG ,
285
+ DatabaseInstances .MULTI_INSTANCE ,
286
+ 2 ,
287
+ DatabaseEngineDeployment .AURORA ,
288
+ TargetPythonVersion .PYTHON_3_8 ,
289
+ TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
290
+ TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ,
291
+ excludeFailover ? null : TestEnvironmentFeatures .FAILOVER_SUPPORTED ,
292
+ TestEnvironmentFeatures .AWS_CREDENTIALS_ENABLED ,
293
+ excludeMysqlDriver ? TestEnvironmentFeatures .SKIP_MYSQL_DRIVER_TESTS : null ,
294
+ excludePgDriver ? TestEnvironmentFeatures .SKIP_PG_DRIVER_TESTS : null ,
295
+ testAutoscalingOnly ? TestEnvironmentFeatures .RUN_AUTOSCALING_TESTS_ONLY : null )));
296
+ }
297
+ }
298
+
213
299
if (!excludeMysqlEngine && !excludePython311 ) {
214
300
if (numInstances == null || numInstances == 5 ) {
215
301
resultContextList .add (
@@ -251,6 +337,7 @@ public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContex
251
337
testAutoscalingOnly ? TestEnvironmentFeatures .RUN_AUTOSCALING_TESTS_ONLY : null )));
252
338
}
253
339
}
340
+
254
341
if (!excludePgEngine && !excludePython311 ) {
255
342
if (numInstances == null || numInstances == 5 ) {
256
343
resultContextList .add (
@@ -297,6 +384,67 @@ public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContex
297
384
}
298
385
299
386
if (!excludeMultiAz ) {
387
+ if (!excludeMysqlEngine && !excludePython38 ) {
388
+ if (numInstances != null && numInstances != 3 ) {
389
+ LOGGER .warning (numInstances + " instances were requested, but multi-az tests are only supported with" +
390
+ " 3 instances. The multi-az tests will be run with 3 instances, and NUM_INSTANCES will be ignored." );
391
+ }
392
+
393
+ if (!excludeFailover ) {
394
+ LOGGER .warning ("Tests requiring database failover are not supported for multi-az clusters. It may take 1hr+" +
395
+ " for the original writer to become available again after multi-az failover. Tests requiring database " +
396
+ " failover will be skipped for multi-az test runs." );
397
+ }
398
+
399
+ resultContextList .add (
400
+ getEnvironment (
401
+ new TestEnvironmentRequest (
402
+ DatabaseEngine .MYSQL ,
403
+ DatabaseInstances .MULTI_INSTANCE ,
404
+ 3 ,
405
+ DatabaseEngineDeployment .MULTI_AZ ,
406
+ TargetPythonVersion .PYTHON_3_8 ,
407
+ TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
408
+ // Tests requiring database failover are not supported. It may take 1hr+ for the original writer to
409
+ // become available after multi-az failover.
410
+ TestEnvironmentFeatures .AWS_CREDENTIALS_ENABLED ,
411
+ excludeSecretsManager ? null : TestEnvironmentFeatures .SECRETS_MANAGER ,
412
+ excludePerformance ? null : TestEnvironmentFeatures .PERFORMANCE ,
413
+ excludeMysqlDriver ? TestEnvironmentFeatures .SKIP_MYSQL_DRIVER_TESTS : null ,
414
+ excludePgDriver ? TestEnvironmentFeatures .SKIP_PG_DRIVER_TESTS : null )));
415
+ }
416
+
417
+ if (!excludePgEngine && !excludePython38 ) {
418
+ if (numInstances != null && numInstances != 3 ) {
419
+ LOGGER .warning (numInstances + " instances were requested, but multi-az tests are only supported with" +
420
+ " 3 instances. The multi-az tests will be run with 3 instances, and NUM_INSTANCES will be ignored." );
421
+ }
422
+
423
+ if (!excludeFailover ) {
424
+ LOGGER .warning ("Tests requiring database failover are not supported for multi-az clusters. It may take 1hr+" +
425
+ " for the original writer to become available again after multi-az failover. Tests requiring database " +
426
+ " failover will be skipped for multi-az test runs." );
427
+ }
428
+
429
+ resultContextList .add (
430
+ getEnvironment (
431
+ new TestEnvironmentRequest (
432
+ DatabaseEngine .PG ,
433
+ DatabaseInstances .MULTI_INSTANCE ,
434
+ 3 ,
435
+ DatabaseEngineDeployment .MULTI_AZ ,
436
+ TargetPythonVersion .PYTHON_3_8 ,
437
+ TestEnvironmentFeatures .NETWORK_OUTAGES_ENABLED ,
438
+ TestEnvironmentFeatures .ABORT_CONNECTION_SUPPORTED ,
439
+ // Tests requiring database failover are not supported. It may take 1hr+ for the original writer to
440
+ // become available after multi-az failover.
441
+ TestEnvironmentFeatures .AWS_CREDENTIALS_ENABLED ,
442
+ excludeSecretsManager ? null : TestEnvironmentFeatures .SECRETS_MANAGER ,
443
+ excludePerformance ? null : TestEnvironmentFeatures .PERFORMANCE ,
444
+ excludeMysqlDriver ? TestEnvironmentFeatures .SKIP_MYSQL_DRIVER_TESTS : null ,
445
+ excludePgDriver ? TestEnvironmentFeatures .SKIP_PG_DRIVER_TESTS : null )));
446
+ }
447
+
300
448
if (!excludeMysqlEngine && !excludePython311 ) {
301
449
if (numInstances != null && numInstances != 3 ) {
302
450
LOGGER .warning (numInstances + " instances were requested, but multi-az tests are only supported with" +
@@ -326,6 +474,7 @@ public Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContex
326
474
excludeMysqlDriver ? TestEnvironmentFeatures .SKIP_MYSQL_DRIVER_TESTS : null ,
327
475
excludePgDriver ? TestEnvironmentFeatures .SKIP_PG_DRIVER_TESTS : null )));
328
476
}
477
+
329
478
if (!excludePgEngine && !excludePython311 ) {
330
479
if (numInstances != null && numInstances != 3 ) {
331
480
LOGGER .warning (numInstances + " instances were requested, but multi-az tests are only supported with" +
0 commit comments