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)
|
private void WaitUntilOnline(ActiveNode activeNode, Kubernetes client)
|
||||||
{
|
{
|
||||||
WaitUntil(() =>
|
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)
|
private void WaitUntilOffline(string deploymentName, Kubernetes client)
|
||||||
|
@ -100,14 +102,12 @@ namespace CodexDistTests.TestCore
|
||||||
|
|
||||||
private void WaitUntilZeroPods(Kubernetes client)
|
private void WaitUntilZeroPods(Kubernetes client)
|
||||||
{
|
{
|
||||||
WaitUntil(() =>
|
WaitUntil(() => !client.ListNamespacedPod(k8sNamespace).Items.Any());
|
||||||
!client.ListNamespacedPod(k8sNamespace).Items.Any());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WaitUntilNamespaceDeleted(Kubernetes client)
|
private void WaitUntilNamespaceDeleted(Kubernetes client)
|
||||||
{
|
{
|
||||||
WaitUntil(() =>
|
WaitUntil(() => client.ListNamespace().Items.All(n => n.Metadata.Name != k8sNamespace));
|
||||||
client.ListNamespace().Items.All(n => n.Metadata.Name != k8sNamespace));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void WaitUntil(Func<bool> predicate)
|
private void WaitUntil(Func<bool> predicate)
|
||||||
|
|
Loading…
Reference in New Issue