File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1368,7 +1368,9 @@ class QuotaHandlersConfiguration(ConfigurationBase):
13681368 )
13691369
13701370 scheduler : QuotaSchedulerConfiguration = Field (
1371- default_factory = lambda : QuotaSchedulerConfiguration (period = 1 ),
1371+ default_factory = lambda : QuotaSchedulerConfiguration (
1372+ period = 1 , database_reconnection_count = 10 , database_reconnection_delay = 1
1373+ ),
13721374 title = "Quota scheduler" ,
13731375 description = "Quota scheduler configuration" ,
13741376 )
Original file line number Diff line number Diff line change @@ -42,13 +42,25 @@ def test_quota_scheduler_custom_configuration_negative_period() -> None:
4242 QuotaSchedulerConfiguration (period = - 10 )
4343
4444
45+ def test_quota_scheduler_custom_configuration_zero_reconnection_count () -> None :
46+ """Test that zero database reconnection count value raises ValidationError."""
47+ with pytest .raises (ValidationError , match = "Input should be greater than 0" ):
48+ QuotaSchedulerConfiguration (database_reconnection_count = 0 )
49+
50+
4551def test_quota_scheduler_custom_configuration_negative_reconnection_count () -> None :
46- """Test that negative period value raises ValidationError."""
52+ """Test that negative database reconnection count value raises ValidationError."""
4753 with pytest .raises (ValidationError , match = "Input should be greater than 0" ):
4854 QuotaSchedulerConfiguration (database_reconnection_count = - 10 )
4955
5056
57+ def test_quota_scheduler_custom_configuration_zero_reconnection_delay () -> None :
58+ """Test that zero database reconnection delay value raises ValidationError."""
59+ with pytest .raises (ValidationError , match = "Input should be greater than 0" ):
60+ QuotaSchedulerConfiguration (database_reconnection_delay = 0 )
61+
62+
5163def test_quota_scheduler_custom_configuration_negative_reconnection_delay () -> None :
52- """Test that negative period value raises ValidationError."""
64+ """Test that negative database reconnection delay value raises ValidationError."""
5365 with pytest .raises (ValidationError , match = "Input should be greater than 0" ):
5466 QuotaSchedulerConfiguration (database_reconnection_delay = - 10 )
You can’t perform that action at this time.
0 commit comments