File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -387,6 +387,7 @@ static const char *FullLogName = nullptr;
387
387
static const char *ResultsLogName = nullptr ;
388
388
static const char *TestTimeout = nullptr ; // Stores timeout in seconds for all tests
389
389
static const char *TestTimeoutRetries = nullptr ; // Number of timeout retries for all tests
390
+ #define MAX_ALLOWED_TIMEOUT_RETRIES 100 // Arbitrary max to avoid accidentally specifying too many retries
390
391
391
392
// NOTE: this might be unused now
392
393
static char TempPath[MAX_PATH] = " " ; // Path for temporary files
@@ -3566,7 +3567,7 @@ IsTimeoutRetriesStringValid(const char *strTimeoutRetries)
3566
3567
// (especially with the default timeout being multiple minutes long),
3567
3568
// so limit the number of retries to some arbitrary max.
3568
3569
3569
- if (numRetries > 100 )
3570
+ if (numRetries > MAX_ALLOWED_TIMEOUT_RETRIES )
3570
3571
{
3571
3572
return FALSE ;
3572
3573
}
@@ -3655,7 +3656,7 @@ GetTestInfoFromNode
3655
3656
if (!IsTimeoutRetriesStringValid (testInfo->data [i]))
3656
3657
{
3657
3658
CFG_ERROR_EX (fileName, node->LineNumber ,
3658
- " Invalid number of timeout retries specified. Value must be numeric and <= 100 .\n " , nullptr );
3659
+ " Invalid number of timeout retries specified. Value must be numeric and <= %d .\n " , MAX_ALLOWED_TIMEOUT_RETRIES );
3659
3660
childNode->Dump ();
3660
3661
return FALSE ;
3661
3662
}
You can’t perform that action at this time.
0 commit comments