@@ -125,8 +125,12 @@ async def test_deploy_async_replication_setup(
125
125
num_units = CLUSTER_SIZE ,
126
126
config = {"profile" : "testing" },
127
127
)
128
- await ops_test .model .deploy (APPLICATION_NAME , channel = "latest/edge" , num_units = 1 )
129
- await second_model .deploy (APPLICATION_NAME , channel = "latest/edge" , num_units = 1 )
128
+ await ops_test .model .deploy (
129
+ APPLICATION_NAME , channel = "latest/edge" , num_units = 1 , config = {"sleep_interval" : 1000 }
130
+ )
131
+ await second_model .deploy (
132
+ APPLICATION_NAME , channel = "latest/edge" , num_units = 1 , config = {"sleep_interval" : 1000 }
133
+ )
130
134
131
135
async with ops_test .fast_forward (), fast_forward (second_model ):
132
136
await gather (
@@ -535,36 +539,32 @@ async def test_scaling(
535
539
logger .info ("checking whether writes are increasing" )
536
540
await are_writes_increasing (ops_test )
537
541
538
- async with ops_test .fast_forward (FAST_INTERVAL ), fast_forward (second_model , FAST_INTERVAL ):
539
- logger .info ("scaling out the first cluster" )
540
- first_cluster_original_size = len (first_model .applications [DATABASE_APP_NAME ].units )
541
- await scale_application (ops_test , DATABASE_APP_NAME , first_cluster_original_size + 1 )
542
-
543
- logger .info ("checking whether writes are increasing" )
544
- await are_writes_increasing (ops_test , extra_model = second_model )
545
-
546
- logger .info ("scaling out the second cluster" )
547
- second_cluster_original_size = len (second_model .applications [DATABASE_APP_NAME ].units )
548
- await scale_application (
549
- ops_test , DATABASE_APP_NAME , second_cluster_original_size + 1 , model = second_model
550
- )
551
-
552
- logger .info ("checking whether writes are increasing" )
553
- await are_writes_increasing (ops_test , extra_model = second_model )
554
-
555
- logger .info ("scaling in the first cluster" )
556
- await scale_application (ops_test , DATABASE_APP_NAME , first_cluster_original_size )
542
+ logger .info ("scaling out the clusters" )
543
+ first_cluster_original_size = len (first_model .applications [DATABASE_APP_NAME ].units )
544
+ second_cluster_original_size = len (second_model .applications [DATABASE_APP_NAME ].units )
545
+ await gather (
546
+ scale_application (ops_test , DATABASE_APP_NAME , first_cluster_original_size + 1 ),
547
+ scale_application (
548
+ ops_test ,
549
+ DATABASE_APP_NAME ,
550
+ second_cluster_original_size + 1 ,
551
+ model = second_model ,
552
+ ),
553
+ )
557
554
558
- logger .info ("checking whether writes are increasing" )
559
- await are_writes_increasing (ops_test , extra_model = second_model )
555
+ logger .info ("checking whether writes are increasing" )
556
+ await are_writes_increasing (ops_test , extra_model = second_model )
560
557
561
- logger .info ("scaling in the second cluster" )
562
- await scale_application (
558
+ logger .info ("scaling in the clusters" )
559
+ await gather (
560
+ scale_application (ops_test , DATABASE_APP_NAME , first_cluster_original_size ),
561
+ scale_application (
563
562
ops_test , DATABASE_APP_NAME , second_cluster_original_size , model = second_model
564
- )
563
+ ),
564
+ )
565
565
566
- logger .info ("checking whether writes are increasing" )
567
- await are_writes_increasing (ops_test , extra_model = second_model )
566
+ logger .info ("checking whether writes are increasing" )
567
+ await are_writes_increasing (ops_test , extra_model = second_model )
568
568
569
569
# Verify that no writes to the database were missed after stopping the writes
570
570
# (check that all the units have all the writes).
0 commit comments