sqs TestCreateQueueWithAttributes fails randomly due to dependency on map order · Issue #18 · goamz/goamz · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TestCreateQueueWithAttributes asserts the name/values for attribute.1. and attribute.2, but since they are added using a map and then range, it isn't deterministic which order they actually appear when checking the request against the expected values.
This can manifest itself in failures like:
FAIL: sqs_test.go:53: S.TestCreateQueueWithAttributes
sqs_test.go:63:
// TestCreateQueue() tests the core functionality, just check the timeout in this test
c.Assert(req.Form["Attribute.1.Name"], gocheck.DeepEquals, []string{"ReceiveMessageWaitTimeSeconds"})
... obtained []string = []string{"VisibilityTimeout"}
... expected []string = []string{"ReceiveMessageWaitTimeSeconds"}
For me this test passes about 85% of the time (which I think is a go runtime deficiency, it should fail ~ 50% of the time). This test should be changed to not depend on the hash ordering so it will pass all the time.
The text was updated successfully, but these errors were encountered:
TestCreateQueueWithAttributes asserts the name/values for attribute.1. and attribute.2, but since they are added using a map and then range, it isn't deterministic which order they actually appear when checking the request against the expected values.
This can manifest itself in failures like:
FAIL: sqs_test.go:53: S.TestCreateQueueWithAttributes
sqs_test.go:63:
// TestCreateQueue() tests the core functionality, just check the timeout in this test
c.Assert(req.Form["Attribute.1.Name"], gocheck.DeepEquals, []string{"ReceiveMessageWaitTimeSeconds"})
... obtained []string = []string{"VisibilityTimeout"}
... expected []string = []string{"ReceiveMessageWaitTimeSeconds"}
For me this test passes about 85% of the time (which I think is a go runtime deficiency, it should fail ~ 50% of the time). This test should be changed to not depend on the hash ordering so it will pass all the time.
The text was updated successfully, but these errors were encountered: