Skip to content

Increase e2e duration #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ func TestCapcityCheck(t *testing.T) {
client, err := kubernetes.NewForConfig(cfg)
require.NoError(t, err)

require.Never(t, func() bool {
nodeList, err := client.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{LabelSelector: "xkf.xenit.io/node-ttl"})
require.NoError(t, err)
for _, node := range nodeList.Items {
t.Log("checking that node is not evicted", node.Name)
require.Never(t, func() bool {
nodeList, err := client.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{LabelSelector: "xkf.xenit.io/node-ttl"})
require.NoError(t, err)
for _, node := range nodeList.Items {
t.Log("checking that node is not evicted", node.Name)
// TODO: There should be a better way to check that eviction is due to node ttl
return node.Spec.Unschedulable
}
return false
}, 1 * time.Minute, 5 * time.Second)
return node.Spec.Unschedulable
}
return false
}, 1*time.Minute, 5*time.Second)
}

func TestTTLEviction(t *testing.T) {
Expand Down Expand Up @@ -66,7 +66,7 @@ func TestTTLEviction(t *testing.T) {
return false
}
return true
}, 1*time.Minute, 1*time.Second, "node should be evicted due to TTL")
}, 2*time.Minute, 1*time.Second, "node should be evicted due to TTL")
t.Log("node has been marked unschedulable by node ttl", node.Name)

require.Eventually(t, func() bool {
Expand Down