Adds catch-retry to geth info extractor
This commit is contained in:
parent
8880ddd2bd
commit
ca822c508d
|
@ -40,7 +40,7 @@ namespace DistTestCore.Marketplace
|
||||||
|
|
||||||
private string Retry(Func<string> fetch)
|
private string Retry(Func<string> fetch)
|
||||||
{
|
{
|
||||||
var result = fetch();
|
var result = Catch(fetch);
|
||||||
if (string.IsNullOrEmpty(result))
|
if (string.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
Thread.Sleep(TimeSpan.FromSeconds(5));
|
Thread.Sleep(TimeSpan.FromSeconds(5));
|
||||||
|
@ -49,6 +49,18 @@ namespace DistTestCore.Marketplace
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string Catch(Func<string> fetch)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return fetch();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private string FetchGenesisJson()
|
private string FetchGenesisJson()
|
||||||
{
|
{
|
||||||
return workflow.ExecuteCommand(container, "cat", GethContainerRecipe.GenesisFilename);
|
return workflow.ExecuteCommand(container, "cat", GethContainerRecipe.GenesisFilename);
|
||||||
|
|
Loading…
Reference in New Issue