htlcswitch: add new concurrentTester wrapper struct

In this commit we add a new wrapper struct for the testing.T struct
that allows multiple clients to attempt to fail a given test at the
same time.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-11-11 15:05:15 -08:00
1 parent 861412529d
commit a702aace9c
3 files changed
+26 -4

No files matched your search

+2 -2
View File
@@ -30,7 +30,7 @@ type mockServer struct {
wg sync.WaitGroup
quit chan struct{}
t *testing.T
t testing.TB
name string
messages chan lnwire.Message
@@ -46,7 +46,7 @@ type mockServer struct {
var _ Peer = (*mockServer)(nil)
func newMockServer(t *testing.T, name string) *mockServer {
func newMockServer(t testing.TB, name string) *mockServer {
var id [33]byte
h := sha256.Sum256([]byte(name))
copy(id[:], h[:])