samba-in-kubernetes / samba-operator

An operator for a Samba as a service on PVCs in kubernetes
Apache License 2.0
110 stars 24 forks source link

integration tests: Increase timeout for cleanup tests #156

Closed spuiuk closed 2 years ago

spuiuk commented 2 years ago

When testing clustered create and delete, the pods are created serially and take much longer to come up causing test failures.

Increase the timeout for these tests to take into account the time required to bring up the cluster. We also reuse timeout variables in the create-delete tests.

Signed-off-by: Sachin Prabhu sprabhu@redhat.com

anoopcs9 commented 2 years ago

This is exactly what I was talking about earlier for which I have been testing on CentOS CI with a similar change and following additional diff:

diff --git a/tests/test.sh b/tests/test.sh
index 17c2a14..7eb8e48 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -4,7 +4,11 @@ set -e
 cd "$(dirname "${0}")/.."

 gtest() {
-    go test -tags integration -v -count 1 "$@"
+    if [ "$SMBOP_TEST_CLUSTERED" ]; then
+        go test -tags integration -v -count 1 -timeout 20m "$@"
+    else
+        go test -tags integration -v -count 1 "$@"
+    fi
 }

 if [ "$SMBOP_TEST_RUN" ]; then

Initially I had 15m which came pretty close frequently and I raised it upto 20m.

spuiuk commented 2 years ago

This is exactly what I was talking about earlier for which I have been testing on CentOS CI with a similar change and following additional diff:

diff --git a/tests/test.sh b/tests/test.sh
index 17c2a14..7eb8e48 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -4,7 +4,11 @@ set -e
 cd "$(dirname "${0}")/.."

 gtest() {
-    go test -tags integration -v -count 1 "$@"
+    if [ "$SMBOP_TEST_CLUSTERED" ]; then
+        go test -tags integration -v -count 1 -timeout 20m "$@"
+    else
+        go test -tags integration -v -count 1 "$@"
+    fi
 }

 if [ "$SMBOP_TEST_RUN" ]; then

Initially I had 15m which came pretty close frequently and I raised it upto 20m.

I was investigating just a single test which was failing in my setup and it turned out to be the create-delete tests timing out due to the short hard coded values. I guess we need a separate PR for the overall timeout issue.

anoopcs9 commented 2 years ago

/retest centos-ci/sink-clustered/mini-k8s-1.22

phlogistonjohn commented 2 years ago

@anoopcs9 your change looks good too (although seems maybe out of date?). Please don't hesitate to file a PR for that.