@@ -213,7 +213,7 @@ func TestIsAuthenticated(t *testing.T) {
213
213
cancelFirstCall bool
214
214
}{
215
215
"Successfully_authenticate" : {sessionID : "success" },
216
- "Successfully_authenticate_after_cancelling_first_call" : {sessionID : "ia_second_call" , secondCall : true },
216
+ "Successfully_authenticate_after_cancelling_first_call" : {sessionID : "ia_second_call" , secondCall : true , cancelFirstCall : true },
217
217
"Denies_authentication_when_broker_times_out" : {sessionID : "ia_timeout" },
218
218
"Adds_default_groups_even_if_broker_did_not_set_them" : {sessionID : "ia_info_empty_groups" },
219
219
"No_error_when_auth.Next_and_no_data" : {sessionID : "ia_next" },
@@ -236,7 +236,7 @@ func TestIsAuthenticated(t *testing.T) {
236
236
"Error_when_broker_returns_data_on_auth.Cancelled" : {sessionID : "ia_cancelled_with_data" },
237
237
"Error_when_broker_returns_no_data_on_auth.Denied" : {sessionID : "ia_denied_without_data" },
238
238
"Error_when_broker_returns_no_data_on_auth.Retry" : {sessionID : "ia_retry_without_data" },
239
- "Error_when_calling_IsAuthenticated_a_second_time_without_cancelling" : {sessionID : "ia_second_call" , secondCall : true , cancelFirstCall : true },
239
+ "Error_when_calling_IsAuthenticated_a_second_time_without_cancelling" : {sessionID : "ia_second_call" , secondCall : true },
240
240
}
241
241
for name , tc := range tests {
242
242
t .Run (name , func (t * testing.T ) {
@@ -264,7 +264,7 @@ func TestIsAuthenticated(t *testing.T) {
264
264
time .Sleep (time .Second )
265
265
266
266
if tc .secondCall {
267
- if ! tc .cancelFirstCall {
267
+ if tc .cancelFirstCall {
268
268
cancel ()
269
269
<- done
270
270
}
0 commit comments