@@ -66,17 +66,20 @@ private function manageRequest(
66
66
public function setInitialState (): void
67
67
{
68
68
$ this ->deleteAllDecisions ();
69
+ sleep (1 );
69
70
$ now = new \DateTime ();
70
71
$ this ->addDecision ($ now , '12h ' , '+12 hours ' , TestHelpers::BAD_IP , 'captcha ' );
71
72
$ this ->addDecision ($ now , '24h ' , self ::HOURS24 , TestHelpers::BAD_IP . '/ ' . TestHelpers::IP_RANGE , 'ban ' );
72
73
$ this ->addDecision ($ now , '24h ' , '+24 hours ' , TestHelpers::JAPAN , 'captcha ' , Constants::SCOPE_COUNTRY );
74
+ sleep (1 );
73
75
}
74
76
75
77
/** Set the second watcher state */
76
78
public function setSecondState (): void
77
79
{
78
80
$ this ->logger ->info ('' , ['message ' => 'Set "second" state ' ]);
79
81
$ this ->deleteAllDecisions ();
82
+ sleep (1 );
80
83
$ now = new \DateTime ();
81
84
$ this ->addDecision ($ now , '36h ' , '+36 hours ' , TestHelpers::NEWLY_BAD_IP , 'ban ' );
82
85
$ this ->addDecision (
@@ -89,6 +92,7 @@ public function setSecondState(): void
89
92
$ this ->addDecision ($ now , '24h ' , self ::HOURS24 , TestHelpers::JAPAN , 'captcha ' , Constants::SCOPE_COUNTRY );
90
93
$ this ->addDecision ($ now , '24h ' , self ::HOURS24 , TestHelpers::IP_JAPAN , 'ban ' );
91
94
$ this ->addDecision ($ now , '24h ' , self ::HOURS24 , TestHelpers::IP_FRANCE , 'ban ' );
95
+ sleep (1 );
92
96
}
93
97
94
98
public function setSimpleDecision (string $ type = 'ban ' ): void
0 commit comments