Admiral-Piett / goaws

AWS (SQS/SNS) Clone for Development testing
MIT License
767 stars 144 forks source link

Add SetQueueAttributesV1 for JSON support #302

Closed Admiral-Piett closed 1 month ago

Admiral-Piett commented 1 month ago

@andrew-womeldorf I rebased and now I'm getting some race condition-y/index out of bound errors in my tests. How did you fix your issues in particular? I couldn't see much from the github history with all the squashing and things.

andrew-womeldorf commented 1 month ago

Interesting. The tests still pass fine on feature-aws-json, but I can reproduce the error locally when I checkout this branch. Looking...

andrew-womeldorf commented 1 month ago

It looks like something maybe isn't being reset between tests. Running only the failing test, there isn't a failure

go test -cover -race -run TestReceiveMessageWaitTimeEnforcedV1 ./app/gosqs/...
andrew-womeldorf commented 1 month ago

Something is happening, though. If I comment out the failing test entirely, then the next test in that file fails with a similar cause.

Note the log messages prior to the failure:

time="2024-05-28T07:28:54-05:00" level=error msg="Invalid Request - ListQueuesV1"
time="2024-05-28T07:28:54-05:00" level=error msg="Invalid RedrivePolicy Attribute"
time="2024-05-28T07:28:54-05:00" level=error msg="Invalid Request - ReceiveMessageV1"
time="2024-05-28T07:28:54-05:00" level=error msg="Invalid Request - CreateQueueV1"
time="2024-05-28T07:28:54-05:00" level=error msg="Invalid Request - ReceiveMessageV1"
andrew-womeldorf commented 1 month ago

If I reset the utils.REQUEST_TRANSFORMER = utils.TransformRequest at the top of the test, everything passes like normal. I'm assuming some test isn't resetting that properly. Looking...