@@ -535,6 +535,27 @@ Y_UNIT_TEST_SUITE(TestSqsTopicHttpProxy) {
535535 DeleteMessage ({{" QueueUrl" , path.QueueUrl }, {" ReceiptHandle" , receiptHandle}});
536536 }
537537
538+ Y_UNIT_TEST_F (TestDeleteMessageIdempotence, TFixture) {
539+ auto driver = MakeDriver (*this );
540+ const TSqsTopicPaths path;
541+ bool a = CreateTopic (driver, path.TopicName , path.ConsumerName );
542+ UNIT_ASSERT (a);
543+ TString body = " MessageBody-0" ;
544+ SendMessage ({{" QueueUrl" , path.QueueUrl }, {" MessageBody" , body}});
545+ auto json = ReceiveMessage ({{" QueueUrl" , path.QueueUrl }, {" WaitTimeSeconds" , 20 }});
546+
547+ UNIT_ASSERT_VALUES_EQUAL (json[" Messages" ].GetArray ().size (), 1 );
548+ UNIT_ASSERT_VALUES_EQUAL (json[" Messages" ][0 ][" Body" ], body);
549+
550+ auto receiptHandle = json[" Messages" ][0 ][" ReceiptHandle" ].GetString ();
551+ UNIT_ASSERT (!receiptHandle.empty ());
552+
553+ DeleteMessage ({{" QueueUrl" , path.QueueUrl }, {" ReceiptHandle" , receiptHandle}});
554+ if (!" X-Fail" ) { // TODO MLP commit idempotence
555+ DeleteMessage ({{" QueueUrl" , path.QueueUrl }, {" ReceiptHandle" , receiptHandle}});
556+ }
557+ }
558+
538559 Y_UNIT_TEST_F (TestDeleteMessageBatch, TFixture) {
539560 auto driver = MakeDriver (*this );
540561 const TSqsTopicPaths path;
0 commit comments