Return if no available binary in the given range

This commit is contained in:
Chaoguang Lin 2021-09-03 14:21:16 -07:00
parent f7002e2a66
commit 56ed0f3b9c
1 changed files with 7 additions and 1 deletions

View File

@ -334,7 +334,13 @@ namespace SummarizeTest
// thus, by definition, if "until_" appears, we do not want to run with the current binary version
oldBinaries = oldBinaries.Concat(currentBinary);
}
oldServerName = random.Choice(oldBinaries.ToList<string>());
List<string> oldBinariesList = oldBinaries.ToList<string>();
if (oldBinariesList.Count == 0) {
Console.WriteLine("No available binary version from {0} to {1}", oldBinaryVersionLowerBound, oldBinaryVersionUpperBound);
return 0;
} else {
oldServerName = random.Choice(oldBinariesList);
}
}
else
{