SFTP Test fail on ReadFrom method
To check before any action. While running the tests again and again I found this error (cf: stack below) The failure is a very rare event.
On pkg/sftp/server_test.go
l.501
It seems dst.ReadFrom(src)
return nil despite the connection being closed the line above.
The test stack:
Failures:
* /home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go
Line 501:
Expected '<nil>' to NOT be nil (but it was)!
goroutine 932 [running]:
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:143 +0x6f
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/reporting/reports.go:103 +0x71
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:176 +0xe6
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:125 +0x66
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer.func1.1.3.2.2.3.1()
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:501 +0xa5
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x24
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x125
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x48
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x462
github.com/jtolds/gls.EnsureGoroutineId(0xc0004b6c90)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x11d
github.com/jtolds/gls.(*ContextManager).SetValues(0xc00006dcf0, 0xc0004b6c30, 0xc000616d20)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x153
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x1c8
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x92
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer.func1.1.3.2.2.3()
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:500 +0x432
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x24
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x125
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x48
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x462
github.com/jtolds/gls.EnsureGoroutineId(0xc00040c210)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x11d
github.com/jtolds/gls.(*ContextManager).SetValues(0xc00006dcf0, 0xc00040c1b0, 0xc00031c0e0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x153
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x1c8
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x92
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer.func1.1.3.2.2()
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:489 +0x426
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x24
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x125
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x48
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x462
github.com/jtolds/gls.EnsureGoroutineId(0xc00040c120)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x11d
github.com/jtolds/gls.(*ContextManager).SetValues(0xc00006dcf0, 0xc00040c0c0, 0xc00031c0a0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x153
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x1c8
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x92
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer.func1.1.3.2()
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:359 +0x513
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x24
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x125
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x48
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x462
github.com/jtolds/gls.EnsureGoroutineId(0xc000297c80)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x11d
github.com/jtolds/gls.(*ContextManager).SetValues(0xc00006dcf0, 0xc000297bf0, 0xc0006f8720)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x153
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x1c8
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x92
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer.func1.1.3()
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:340 +0x268
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x24
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x125
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x48
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x462
github.com/jtolds/gls.EnsureGoroutineId(0xc000297b00)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x11d
github.com/jtolds/gls.(*ContextManager).SetValues(0xc00006dcf0, 0xc000297aa0, 0xc0006f86e0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x153
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x1c8
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x92
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer.func1.1()
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:333 +0xe9a
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/discovery.go:80 +0x24
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x125
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:163 +0x48
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x462
github.com/jtolds/gls.EnsureGoroutineId(0xc0004cd4d0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:19 +0x11d
github.com/jtolds/gls.(*ContextManager).SetValues(0xc00006dcf0, 0xc0004cd470, 0xc00070fa20)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x153
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:162 +0x1c8
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:77 +0x92
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer.func1(0xb6b420, 0xc000362ba0)
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:128 +0x107
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:261 +0x125
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:110 +0xf0
github.com/jtolds/gls.(*ContextManager).SetValues.func1(0x0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:97 +0x462
github.com/jtolds/gls.EnsureGoroutineId.func1()
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0x2e
github.com/jtolds/gls._m(0x0, 0xc0003e9de0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:108 +0x31
github.com/jtolds/gls.github_com_jtolds_gls_markS(0x0, 0xc0003e9de0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:56 +0x35
github.com/jtolds/gls.addStackTag(...)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/stack_tags.go:49
github.com/jtolds/gls.EnsureGoroutineId(0xc0003a3ad0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/gid.go:24 +0xfd
github.com/jtolds/gls.(*ContextManager).SetValues(0xc00006dcf0, 0xc0003a3a10, 0xc0003e9da0)
/home/mro/go/pkg/mod/github.com/jtolds/gls@v4.20.0+incompatible/context.go:63 +0x153
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/context.go:105 +0x231
/home/mro/go/pkg/mod/github.com/smartystreets/goconvey@v1.6.4/convey/doc.go:75 +0xbe
code.waarp.fr/waarp-gateway/waarp-gateway/pkg/sftp.TestSSHServer(0xc000395680)
/home/mro/Projects/waarp-gateway/pkg/sftp/server_test.go:125 +0x1a5
testing.tRunner(0xc000395680, 0xadfee0)
/usr/lib/go/src/testing/testing.go:1123 +0xef
created by testing.(*T).Run
/usr/lib/go/src/testing/testing.go:1168 +0x2b3