Tests: give the fail2ban and task-manager checks room under load
Two long-standing flakes in system_tests, both timing: - security: the ban period was set to one second, but the test makes a hundred more requests before it checks that a valid password from the banned address is refused, so under load the ban had already expired. Five seconds, and the expiry check sleeps six. - task: a task scheduled one second out was queried for straight away, and under load the query landed after the task manager had run and removed it. Three seconds. Seven consecutive system_tests runs, neither recurred.
This commit is contained in:
@@ -39,7 +39,9 @@ pub async fn test(test: &mut TestServer) {
|
||||
admin.assert_no_tasks().await;
|
||||
|
||||
// Create a successful task for future execution
|
||||
admin.schedule_test_task(TASK_SUCCESS, 1).await;
|
||||
// inbuxa: three seconds, not one: the query below takes longer than a
|
||||
// second under load, and the task had already run and been removed
|
||||
admin.schedule_test_task(TASK_SUCCESS, 3).await;
|
||||
admin.assert_has_tasks(1).await;
|
||||
admin.assert_no_tasks().await;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user