no need for sleeps to wait for http server
Since we start the tcp listener in the main thread now, connections can be made immediately; they will just queue up until there is a handler.
This commit is contained in:
1 parent
3ad08c0f2a
commit
08a17ec376
2 files changed
-7
No files matched your search
@@ -68,8 +68,6 @@ func TestHttp(t *testing.T) {
|
||||
alloc := makeAllocatorWithMockGossip(t, "08:00:27:01:c3:9a", testCIDR1, 1)
|
||||
port := listenHTTP(alloc)
|
||||
|
||||
time.Sleep(100 * time.Millisecond) // Allow for http server to get going
|
||||
|
||||
alloc.claimRingForTesting()
|
||||
// Ask the http server for a new address
|
||||
cidr1 := HTTPPost(t, allocURL(port, containerID))
|
||||
@@ -139,8 +137,6 @@ func impTestHTTPCancel(t *testing.T) {
|
||||
alloc.claimRingForTesting()
|
||||
port := listenHTTP(alloc)
|
||||
|
||||
time.Sleep(100 * time.Millisecond) // Allow for http server to get going
|
||||
|
||||
// Stop the alloc so nothing actually works
|
||||
unpause := alloc.pause()
|
||||
|
||||
|
||||
Reference in new issue
Block a user