0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-09-27 21:38:54 +02:00

Give more time to TestSessionCleanUp tests

This commit is contained in:
Neil Alexander 2022-03-03 12:37:12 +00:00
parent 6ed8cf0e07
commit 43ab0288f4
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -219,7 +219,7 @@ func TestSessionCleanUp(t *testing.T) {
// manually added, as s.addParams() would start the timer with the default timeout // manually added, as s.addParams() would start the timer with the default timeout
s.params[dummySession] = registerRequest{Username: "Testing"} s.params[dummySession] = registerRequest{Username: "Testing"}
s.startTimer(time.Millisecond, dummySession) s.startTimer(time.Millisecond, dummySession)
time.Sleep(time.Millisecond * 2) time.Sleep(time.Millisecond * 50)
if data, ok := s.getParams(dummySession); ok { if data, ok := s.getParams(dummySession); ok {
t.Errorf("expected session to be deleted: %+v", data) t.Errorf("expected session to be deleted: %+v", data)
} }
@ -246,7 +246,7 @@ func TestSessionCleanUp(t *testing.T) {
s.getCompletedStages(dummySession) s.getCompletedStages(dummySession)
// reset the timer with a lower timeout // reset the timer with a lower timeout
s.startTimer(time.Millisecond, dummySession) s.startTimer(time.Millisecond, dummySession)
time.Sleep(time.Millisecond * 2) time.Sleep(time.Millisecond * 50)
if data, ok := s.getParams(dummySession); ok { if data, ok := s.getParams(dummySession); ok {
t.Errorf("expected session to be deleted: %+v", data) t.Errorf("expected session to be deleted: %+v", data)
} }