go-imap
go-imap copied to clipboard
Neopallium server-side fixes and improvements
This is https://github.com/emersion/go-imap/pull/300 rebased against master.
The AutoLogout test has a race:
==================
WARNING: DATA RACE
Write at 0x00c000172800 by goroutine 51:
github.com/emersion/go-imap/server_test.TestLogin_AutoLogout()
/home/simon/src/go-imap/server/cmd_noauth_test.go:133 +0x134
testing.tRunner()
/usr/lib/go/src/testing/testing.go:909 +0x199
Previous read at 0x00c000172800 by goroutine 46:
github.com/emersion/go-imap/server.(*conn).setDeadline()
/home/simon/src/go-imap/server/conn.go:134 +0x6a
github.com/emersion/go-imap/server.(*conn).greet()
/home/simon/src/go-imap/server/conn.go:151 +0x3f7
github.com/emersion/go-imap/server.(*conn).serve()
/home/simon/src/go-imap/server/conn.go:285 +0x138
github.com/emersion/go-imap/server.(*Server).serveConn()
/home/simon/src/go-imap/server/server.go:289 +0x1c1
Goroutine 51 (running) created at:
testing.(*T).Run()
/usr/lib/go/src/testing/testing.go:960 +0x651
testing.runTests.func1()
/usr/lib/go/src/testing/testing.go:1202 +0xa6
testing.tRunner()
/usr/lib/go/src/testing/testing.go:909 +0x199
testing.runTests()
/usr/lib/go/src/testing/testing.go:1200 +0x521
testing.(*M).Run()
/usr/lib/go/src/testing/testing.go:1117 +0x2ff
main.main()
_testmain.go:198 +0x223
Goroutine 46 (running) created at:
github.com/emersion/go-imap/server.(*Server).Serve()
/home/simon/src/go-imap/server/server.go:237 +0x256
==================
Also, the AutoLogout test consistently takes 2 seconds. Not sure how to improve that since it's time-related.
cc @Neopallium
Codecov Report
:exclamation: No coverage uploaded for pull request base (
master@b27ce89
). Click here to learn what that means. The diff coverage isn/a
.
@@ Coverage Diff @@
## master #338 +/- ##
=========================================
Coverage ? 73.90%
=========================================
Files ? 32
Lines ? 3537
Branches ? 0
=========================================
Hits ? 2614
Misses ? 633
Partials ? 290
Impacted Files | Coverage Δ | |
---|---|---|
seqset.go | 97.18% <0.00%> (ø) |
|
client/cmd_any.go | 57.89% <0.00%> (ø) |
|
client/cmd_selected.go | 73.60% <0.00%> (ø) |
|
mailbox.go | 82.40% <0.00%> (ø) |
|
search.go | 62.12% <0.00%> (ø) |
|
utf7/utf7.go | 100.00% <0.00%> (ø) |
|
backend/backendutil/flags.go | 100.00% <0.00%> (ø) |
|
server/cmd_noauth.go | 86.56% <0.00%> (ø) |
|
server/cmd_selected.go | 85.71% <0.00%> (ø) |
|
command.go | 60.00% <0.00%> (ø) |
|
... and 22 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b27ce89...4b0db43. Read the comment docs.
The AutoLogout test has a race:
testServer*
functions need "server configuration" callbacks like it is done in go-smtp to set all necessary settings before connecting.
Closing because this is superseded by go-imap v2.