Debian Codegraph @

crt/aws-c-io/tests/no_retry_strategy_test.c

raw symbols SCIP
1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5 #include <aws/io/io.h>
6 #include <aws/io/retry_strategy.h>
7 #include <aws/testing/aws_test_harness.h>
8
9 static int s_test_no_retries_fn(struct aws_allocator *allocator, void *ctx) {
10 (void)ctx;
11
12 aws_io_library_init(allocator);
13
14 struct aws_retry_strategy *retry_strategy = aws_retry_strategy_new_no_retry(allocator, NULL);
15 ASSERT_NOT_NULL(retry_strategy);
16
17 ASSERT_ERROR(
18 AWS_IO_RETRY_PERMISSION_DENIED, aws_retry_strategy_acquire_retry_token(retry_strategy, NULL, NULL, NULL, 0));
19
20 aws_retry_strategy_release(retry_strategy);
21
22 aws_io_library_clean_up();
23
24 return AWS_OP_SUCCESS;
25 }
26
27 AWS_TEST_CASE(test_no_retries, s_test_no_retries_fn)