summaryrefslogtreecommitdiff
path: root/worker/imap/seqmap_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'worker/imap/seqmap_test.go')
-rw-r--r--worker/imap/seqmap_test.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/worker/imap/seqmap_test.go b/worker/imap/seqmap_test.go
index 0ee0738..0fa8711 100644
--- a/worker/imap/seqmap_test.go
+++ b/worker/imap/seqmap_test.go
@@ -39,12 +39,15 @@ func TestSeqMap(t *testing.T) {
assert.Equal(found, true)
assert.Equal(seqmap.Size(), 2)
+ // Repop the same seqnum should work because of the syncing
_, found = seqmap.Pop(1)
- assert.Equal(found, false)
- assert.Equal(seqmap.Size(), 2)
+ assert.Equal(found, true)
+ assert.Equal(seqmap.Size(), 1)
+ // sync means we already have a 1. This is replacing that UID so the size
+ // shouldn't increase
seqmap.Put(1, 7331)
- assert.Equal(seqmap.Size(), 3)
+ assert.Equal(seqmap.Size(), 1)
seqmap.Clear()
assert.Equal(seqmap.Size(), 0)