iain / fake_sqs

Provides a fake SQS server that you can run locally to test against
MIT License
292 stars 103 forks source link

Incorrect number of arguments #25

Open benderTheCrime opened 8 years ago

benderTheCrime commented 8 years ago

Hey There!

What version of the aws-sdk is this package designed around? I am calling send_message on a new queue in a service where historically I have only needed to pass options = {}. An error is being thrown from the SendMessage call in the response:

2015-09-01 16:08:15 - ArgumentError - wrong number of arguments (1 for 2):
    xxx/fake_sqs-0.3.0/lib/fake_sqs/actions/send_message.rb:11:in `call'
    xxx/fake_sqs-0.3.0/lib/fake_sqs/api.rb:41:in `block in call'
    xxx/fake_sqs-0.3.0/lib/fake_sqs/queues.rb:51:in `block in transaction'
    xxx/fake_sqs-0.3.0/lib/fake_sqs/memory_database.rb:24:in `transaction'
    xxx/fake_sqs-0.3.0/lib/fake_sqs/queues.rb:50:in `transaction'
    xxx/fake_sqs-0.3.0/lib/fake_sqs/api.rb:38:in `call'
    xxx//fake_sqs-0.3.0/lib/fake_sqs/web_interface.rb:39:in `block in <class:WebInterface>'
iain commented 8 years ago

I'm running the tests with aws-sdk 2.1.18 (was 2.0.46), seems fine. One of my apps that is using fake_sqs is running aws-sdk 2.1.18 too and aws-sdk-v1 (1.65.0). I've never seen this error before.

benderTheCrime commented 8 years ago

What about 1.41.0. I'm willing to bet that this is just too far a legacy version.

strusewych commented 6 years ago

I got this same issue specifying a QueueUrl for the client that did not include the queue name in the path. Adding the queue name fixed it for me. (i.e. http://localhost:4568 vs http://localhost:4568/my_queue_name)