remove reconnect delay for testing
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func makeWorkerContext(t *testing.T) (
|
func makeWorkerContext(t *testing.T) (
|
||||||
@@ -33,11 +34,14 @@ func makeWorkerContext(t *testing.T) (
|
|||||||
|
|
||||||
func makeWorker(t *testing.T, ctx context.Context, cancel context.CancelFunc) *DefaultWorker {
|
func makeWorker(t *testing.T, ctx context.Context, cancel context.CancelFunc) *DefaultWorker {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
|
config, _ := NewWorkerConfig(
|
||||||
|
WithReconnectDelay(0 * time.Second),
|
||||||
|
)
|
||||||
return &DefaultWorker{
|
return &DefaultWorker{
|
||||||
ctx: ctx,
|
ctx: ctx,
|
||||||
cancel: cancel,
|
cancel: cancel,
|
||||||
id: "wss://test",
|
id: "wss://test",
|
||||||
config: GetDefaultWorkerConfig(),
|
config: config,
|
||||||
heartbeat: make(chan struct{}),
|
heartbeat: make(chan struct{}),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user