userver: /data/code/userver/libraries/sqs/src/sqs/json_client_fixture_test.hpp File Reference
Loading...
Searching...
No Matches
json_client_fixture_test.hpp File Reference

Detailed Description

gtest fixture and helpers for SQS JSON client tests.

Definition in file json_client_fixture_test.hpp.

Go to the source code of this file.

#include <chrono>
#include <memory>
#include <string>
#include <string_view>
#include <userver/clients/http/client.hpp>
#include <userver/engine/sleep.hpp>
#include <userver/sqs/json_client.hpp>
#include <userver/utest/utest.hpp>
#include <aws/sqs/SQSErrors.h>
This graph shows which files directly or indirectly include this file:

Classes

class  SqsJsonClient
 gtest fixture for sqs::JsonClient against the SQS JSON recipe. More...

Functions

std::string GetErrorMessage (const Aws::Client::AWSError< Aws::SQS::SQSErrors > &error)
 Formats an AWS SQS error as "exception: message".
bool IsQueueNotReady (const Aws::Client::AWSError< Aws::SQS::SQSErrors > &error)
 True if the error means the queue is not ready yet.
template<typename Operation>
auto RunWhenQueueIsReady (Operation operation)
 Retries operation while the queue is reported as nonexistent.

Function Documentation

◆ GetErrorMessage()

std::string GetErrorMessage ( const Aws::Client::AWSError< Aws::SQS::SQSErrors > & error)

Formats an AWS SQS error as "exception: message".

Definition at line 110 of file json_client_fixture_test.cpp.

◆ IsQueueNotReady()

bool IsQueueNotReady ( const Aws::Client::AWSError< Aws::SQS::SQSErrors > & error)

True if the error means the queue is not ready yet.

Definition at line 114 of file json_client_fixture_test.cpp.

◆ RunWhenQueueIsReady()

template<typename Operation>
auto RunWhenQueueIsReady ( Operation operation)

Retries operation while the queue is reported as nonexistent.

Definition at line 57 of file json_client_fixture_test.hpp.