From e5eaf4d46fb8d93cba25f2030ea7b5696c092679 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Wed, 25 Dec 2024 16:50:23 +0100 Subject: [PATCH] fix race in imapserver tests --- imapserver/idle_test.go | 3 ++- imapserver/server_test.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/imapserver/idle_test.go b/imapserver/idle_test.go index 906e468..b733bd1 100644 --- a/imapserver/idle_test.go +++ b/imapserver/idle_test.go @@ -11,10 +11,11 @@ import ( func TestIdle(t *testing.T) { tc1 := start(t) defer tc1.close() - tc1.client.Login("mjl@mox.example", password0) tc2 := startNoSwitchboard(t) defer tc2.close() + + tc1.client.Login("mjl@mox.example", password0) tc2.client.Login("mjl@mox.example", password0) tc1.transactf("ok", "select inbox") diff --git a/imapserver/server_test.go b/imapserver/server_test.go index c7f3783..2c9a03c 100644 --- a/imapserver/server_test.go +++ b/imapserver/server_test.go @@ -633,10 +633,11 @@ func TestMailbox(t *testing.T) { func TestMailboxDeleted(t *testing.T) { tc := start(t) defer tc.close() - tc.client.Login("mjl@mox.example", password0) tc2 := startNoSwitchboard(t) defer tc2.close() + + tc.client.Login("mjl@mox.example", password0) tc2.client.Login("mjl@mox.example", password0) tc.client.Create("testbox")