Skip to content

Commit

Permalink
Sentinel value cannot be 0, it horribly ruins all tests where we want…
Browse files Browse the repository at this point in the history
… to disable the retry count. Changed retry count to be a signed int, and made the sentinel value -1
  • Loading branch information
jdelapla committed Dec 10, 2021
1 parent 2caa0c7 commit 38eafd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ extern "C" {
/**
* Signaling caching policy TTL period sentinel value which will force the default period.
*/
#define CREATE_SIGNALING_CLIENT_RETRY_ATTEMPTS_SENTINEL_VALUE 0
#define CREATE_SIGNALING_CLIENT_RETRY_ATTEMPTS_SENTINEL_VALUE -1

/**
* @brief Definition of the signaling client handle
Expand Down Expand Up @@ -1193,7 +1193,7 @@ typedef struct {
//!< located. For default value or when file caching is not
//!< being used this value can be NULL or point to an EMPTY_STRING.
KvsRetryStrategyCallbacks signalingRetryStrategyCallbacks; //!< Retry strategy callbacks used while creating signaling client
UINT32 signalingClientCreationMaxRetryAttempts; //!< Max attempts to create signaling client before returning error to the caller
INT32 signalingClientCreationMaxRetryAttempts; //!< Max attempts to create signaling client before returning error to the caller
UINT32 stateMachineRetryCountReadOnly; //!< Retry count of state machine. Note that this **MUST NOT** be modified by the user. It is a read only field
} SignalingClientInfo, *PSignalingClientInfo;

Expand Down
2 changes: 1 addition & 1 deletion tst/SignalingApiFunctionalityTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ TEST_F(SignalingApiFunctionalityTest, invalidChannelInfoInput)
&signalingHandle);
retStatus = signalingClientFetchSync(signalingHandle);
if (mAccessKeyIdSet) {
EXPECT_TRUE(retStatus == STATUS_OPERATION_TIMED_OUT || retStatus == STATUS_SIGNALING_DESCRIBE_CALL_FAILED);
EXPECT_TRUE(retStatus == STATUS_OPERATION_TIMED_OUT || retStatus == STATUS_SIGNALING_DESCRIBE_CALL_FAILED || retStatus == STATUS_SIGNALING_GET_TOKEN_CALL_FAILED);
} else {
EXPECT_EQ(STATUS_NULL_ARG, retStatus);
}
Expand Down

0 comments on commit 38eafd5

Please sign in to comment.