@@ -495,15 +495,26 @@ func TestDataDriven(t *testing.T) {
495
495
}
496
496
return ""
497
497
case "setting" :
498
- scanIfExists (t , d , "replicate_queue_enabled" , & settingsGen .Settings .ReplicateQueueEnabled )
499
- scanIfExists (t , d , "lease_queue_enabled" , & settingsGen .Settings .LeaseQueueEnabled )
500
- scanIfExists (t , d , "split_queue_enabled" , & settingsGen .Settings .SplitQueueEnabled )
501
- scanIfExists (t , d , "rebalance_mode" , & settingsGen .Settings .LBRebalancingMode )
502
- scanIfExists (t , d , "rebalance_interval" , & settingsGen .Settings .LBRebalancingInterval )
503
- scanIfExists (t , d , "split_qps_threshold" , & settingsGen .Settings .SplitQPSThreshold )
504
- scanIfExists (t , d , "rebalance_range_threshold" , & settingsGen .Settings .RangeRebalanceThreshold )
505
- scanIfExists (t , d , "gossip_delay" , & settingsGen .Settings .StateExchangeDelay )
506
- scanIfExists (t , d , "range_size_split_threshold" , & settingsGen .Settings .RangeSizeSplitThreshold )
498
+ var delay time.Duration
499
+ if isDelayed := scanIfExists (t , d , "delay" , & delay ); isDelayed {
500
+ var rebalanceMode int64
501
+ scanIfExists (t , d , "rebalance_mode" , & rebalanceMode )
502
+ eventGen .ScheduleEvent (settingsGen .Settings .StartTime , delay , event.SetSimulationSettingsEvent {
503
+ Key : "LBRebalancingMode" ,
504
+ Value : rebalanceMode ,
505
+ })
506
+ } else {
507
+ scanIfExists (t , d , "replicate_queue_enabled" , & settingsGen .Settings .ReplicateQueueEnabled )
508
+ scanIfExists (t , d , "lease_queue_enabled" , & settingsGen .Settings .LeaseQueueEnabled )
509
+ scanIfExists (t , d , "split_queue_enabled" , & settingsGen .Settings .SplitQueueEnabled )
510
+ scanIfExists (t , d , "rebalance_mode" , & settingsGen .Settings .LBRebalancingMode )
511
+ scanIfExists (t , d , "rebalance_interval" , & settingsGen .Settings .LBRebalancingInterval )
512
+ scanIfExists (t , d , "split_qps_threshold" , & settingsGen .Settings .SplitQPSThreshold )
513
+ scanIfExists (t , d , "rebalance_range_threshold" , & settingsGen .Settings .RangeRebalanceThreshold )
514
+ scanIfExists (t , d , "gossip_delay" , & settingsGen .Settings .StateExchangeDelay )
515
+ scanIfExists (t , d , "range_size_split_threshold" , & settingsGen .Settings .RangeSizeSplitThreshold )
516
+ scanIfExists (t , d , "rebalance_objective" , & settingsGen .Settings .LBRebalancingObjective )
517
+ }
507
518
return ""
508
519
case "print" :
509
520
var buf strings.Builder
0 commit comments