Fixes mistake in WaitUntilOnline method
This commit is contained in:
parent
63d1d9b451
commit
47bf4bf48b
|
@ -85,8 +85,10 @@ namespace CodexDistTests.TestCore
|
|||
private void WaitUntilOnline(ActiveNode activeNode, Kubernetes client)
|
||||
{
|
||||
WaitUntil(() =>
|
||||
activeNode.Deployment?.Status.AvailableReplicas != null &&
|
||||
activeNode.Deployment.Status.AvailableReplicas > 0);
|
||||
{
|
||||
activeNode.Deployment = client.ReadNamespacedDeployment(activeNode.Deployment.Name(), k8sNamespace);
|
||||
return activeNode.Deployment?.Status.AvailableReplicas != null && activeNode.Deployment.Status.AvailableReplicas > 0;
|
||||
});
|
||||
}
|
||||
|
||||
private void WaitUntilOffline(string deploymentName, Kubernetes client)
|
||||
|
@ -100,14 +102,12 @@ namespace CodexDistTests.TestCore
|
|||
|
||||
private void WaitUntilZeroPods(Kubernetes client)
|
||||
{
|
||||
WaitUntil(() =>
|
||||
!client.ListNamespacedPod(k8sNamespace).Items.Any());
|
||||
WaitUntil(() => !client.ListNamespacedPod(k8sNamespace).Items.Any());
|
||||
}
|
||||
|
||||
private void WaitUntilNamespaceDeleted(Kubernetes client)
|
||||
{
|
||||
WaitUntil(() =>
|
||||
client.ListNamespace().Items.All(n => n.Metadata.Name != k8sNamespace));
|
||||
WaitUntil(() => client.ListNamespace().Items.All(n => n.Metadata.Name != k8sNamespace));
|
||||
}
|
||||
|
||||
private void WaitUntil(Func<bool> predicate)
|
||||
|
|
Loading…
Reference in New Issue