Skip to content
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

parallel e2e testing with different kubeconfigs #1020

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
3800d03
feat(e2e): parallel testing with different kubeconfigs
bartam1 Jul 21, 2023
1561b6a
downgrade e2e k8s.io/apimachinery to the same ver that is used by mai…
bartam1 Jul 24, 2023
d7947cc
add bin/ginkgo Makefile
bartam1 Jul 24, 2023
d9efd7f
parent d7947cc45e8ff9dfcf11f5d121a90e154b58782f
bartam1 Jul 24, 2023
ccc9a6d
update ginkgo to 2.11.0
bartam1 Jul 27, 2023
f8a786d
Merge branch 'master' into e2e_param
bartam1 Jul 27, 2023
56c0634
run allTestCase
bartam1 Jul 27, 2023
527e501
format time output
bartam1 Jul 27, 2023
0f0e07e
increase zookeepercluster and kafkacluster creation timeout
bartam1 Jul 27, 2023
4826fa1
run allTests serial
bartam1 Jul 27, 2023
0764631
zookeeper timeout increased
bartam1 Jul 28, 2023
86586a4
add test progress indicator
bartam1 Jul 28, 2023
2df49bb
report entry refactored
bartam1 Jul 28, 2023
cd250f5
go with one kind cluster
bartam1 Jul 29, 2023
6958dce
Merge branch 'master' into e2e_param
bartam1 Jul 31, 2023
347d28d
refactor comments and K8sClusterPool
bartam1 Jul 31, 2023
2b85e9f
fix mockTests description
bartam1 Aug 3, 2023
b678b17
fix: missing kubectlOptions param
bartam1 Aug 3, 2023
400c0ff
fix David suggestions 1
bartam1 Aug 3, 2023
4c0b935
fix David suggestions 2
bartam1 Aug 3, 2023
4031097
fix unnecessary imports
bartam1 Aug 3, 2023
edab06c
fix: feedFromDirectory
bartam1 Aug 8, 2023
6f55555
Merge branch 'master' into e2e_param
bartam1 Aug 8, 2023
98b4a0d
add fix and test for version and provider identifier
bartam1 Aug 9, 2023
8b72d6c
add test for GetTestSuiteDurationParallel
bartam1 Aug 9, 2023
5154223
add test for testpool
bartam1 Aug 10, 2023
bc10e92
refactor classifier using NewTest constructor
bartam1 Aug 12, 2023
c1fd100
fix classifier unit test
bartam1 Aug 12, 2023
eb7c5a1
add e2e unit tests execution into Makefile
bartam1 Aug 12, 2023
a2952f6
add e2e go fmt go vet
bartam1 Aug 13, 2023
95d6371
fix go.mod
bartam1 Aug 13, 2023
50d3a81
rename GetRawConfig to CreateRawConfig
bartam1 Aug 14, 2023
129e7fe
zookeepecluster create timeout defaults 4min
bartam1 Aug 14, 2023
7029681
test 2 kind cluster setup
bartam1 Aug 16, 2023
7bc2a2d
default strategy versionComplete
bartam1 Aug 16, 2023
4c7b111
Merge branch 'master' into e2e_param
bartam1 Aug 16, 2023
842273f
go with parallel
bartam1 Aug 16, 2023
ba66727
increase zookeeper and kafka cluster creation timeout
bartam1 Aug 16, 2023
a13805f
default pod readiness timeout increased to 60
bartam1 Aug 16, 2023
a947c8c
go with one kind cluster by default
bartam1 Aug 17, 2023
18442f6
Merge branch 'master' into e2e_param
bartam1 Aug 18, 2023
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
12 changes: 9 additions & 3 deletions .github/actions/kind-create/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs: # adding these parameters to make this reusable later on
description: 'Path to the kind config to use'
required: true
default: 'tests/e2e/platforms/kind/kind_config.yaml'
kubeconfig_dir_path:
description: 'Relative dir path of the created kind cluster kubeconfig'
required: true
default: 'tests/e2e/kubeconfigs'
outputs:
kubeconfig:
description: 'Path of the resulting kubeconfig'
Expand All @@ -38,10 +42,12 @@ runs:
kubectl cluster-info
kubectl get pods -n kube-system
echo "current-context:" $(kubectl config current-context)
echo "environment-kubeconfig:" ${KUBECONFIG}
mkdir tests/e2e/platforms/kind/${{ inputs.kind_k8s_version }}
kubeconfig_path=$(pwd)/tests/e2e/platforms/kind/${{ inputs.kind_k8s_version }}/kind.kconf
kubeconfig_dir_path=$(pwd)/${{ inputs.kubeconfig_dir_path }}
mkdir -p $kubeconfig_dir_path
kubeconfig_filename=${{ inputs.kind_cluster_name }}-${{ inputs.kind_k8s_version }}.yaml
bartam1 marked this conversation as resolved.
Show resolved Hide resolved
kubeconfig_path=$kubeconfig_dir_path/$kubeconfig_filename
kind get kubeconfig --name ${{ inputs.kind_cluster_name }} > $kubeconfig_path
chmod 600 $kubeconfig_path
echo "kubeconfig path: $kubeconfig_path"
echo "kubeconfig=$(echo $kubeconfig_path)" >> $GITHUB_OUTPUT
shell: bash
38 changes: 34 additions & 4 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write

steps:
- name: Set up Go
Expand All @@ -19,14 +22,41 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Kind cluster
id: setup-kind
- name: Setup Kind cluster1
id: setup-kind1
uses: ./.github/actions/kind-create
with:
kind_cluster_name: kind1
kind_k8s_version: v1.24.13
kubeconfig_dir_path: tests/e2e/kubeconfigs

# TODO: ZookeeperCluster create time out always on the second kind cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Is it an actual timeout issue or can Zookeeper not start for some reason and we retry until we reach a timeout?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you can see the problem: https://github.com/banzaicloud/koperator/runs/15416787902
It would be nice to get more information why is this fail (like pod status)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because in local environment all of the tests passed when multiple k8s cluster is used in parallel way I suspect that the problem is with timeouts or something else on github

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test the PR with multicluster input on your local.
This PR is not about to run tests on github on multiple kind cluster.

# - name: Setup Kind cluster2
# id: setup-kind2
# uses: ./.github/actions/kind-create
# with:
# kind_cluster_name: kind2
# kind_k8s_version: v1.25.9
# kubeconfig_dir_path: tests/e2e/kubeconfigs

- name: run tests
- name: Run E2E tests
env:
KUBECONFIG: ${{ steps.setup-kind.outputs.kubeconfig }}
TEST_STRATEGY: version
KUBECONFIG_DIR: kubeconfigs
MAX_TIMEOUT: "1h"
run: |
go work init
go work use -r .
make test-e2e

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@master
if: always()
bartam1 marked this conversation as resolved.
Show resolved Hide resolved
with:
commit: ${{ github.event.workflow_run.head_sha }}
report_individual_runs: "true"
check_name: "E2E test report"
large_files: true
comment_mode: off
files: |
tests/e2e/reports/e2e_*.xml
32 changes: 20 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ CONTROLLER_GEN_VERSION = v0.9.2
CONTROLLER_GEN = $(PWD)/bin/controller-gen

ENVTEST_K8S_VERSION = 1.24.2
# Ginkgo version should be the same that is used in the module imports
GINKGO_VERSION := 2.11.0
MOCKGEN_VERSION := 1.6.0


KUSTOMIZE_BASE = config/overlays/specific-manager-version

Expand Down Expand Up @@ -98,15 +102,22 @@ test: generate fmt vet manifests bin/setup-envtest
-timeout 1h
cd properties && go test -coverprofile cover.out -cover -failfast -v -covermode=count ./pkg/... ./internal/...

# Run e2e tests
test-e2e:
go test github.com/banzaicloud/koperator/tests/e2e \
-v \
-timeout 20m \
-tags e2e \
--ginkgo.show-node-events \
--ginkgo.trace \
--ginkgo.v
bin/ginkgo: $(BIN_DIR)/ginkgo-$(GINKGO_VERSION)
@ln -sf ginkgo-$(GINKGO_VERSION) $(BIN_DIR)/ginkgo

$(BIN_DIR)/ginkgo-$(GINKGO_VERSION):
@mkdir -p $(BIN_DIR)
@GOBIN=$(BIN_DIR) go install github.com/onsi/ginkgo/v2/ginkgo@v$(GINKGO_VERSION)
@mv $(BIN_DIR)/ginkgo $(BIN_DIR)/ginkgo-$(GINKGO_VERSION)


# Run e2e tests serial
test-e2e: bin/ginkgo
ginkgo -v --tags e2e tests/e2e

# Run e2e tests parallel
test-e2e-parallel: bin/ginkgo
ginkgo -v -p --tags e2e tests/e2e

# Build manager binary
manager: generate fmt vet
Expand Down Expand Up @@ -252,9 +263,6 @@ gen-license-header: bin/gotemplate ## Generate license header used in source cod
--import="$(BOILERPLATE_DIR)/vars.yml" \
--source="$(BOILERPLATE_DIR)"


MOCKGEN_VERSION := 1.6.0

bin/mockgen: $(BIN_DIR)/mockgen-$(MOCKGEN_VERSION)
@ln -sf mockgen-$(MOCKGEN_VERSION) $(BIN_DIR)/mockgen

Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ require (
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/go-logr/logr v1.2.4
github.com/imdario/mergo v0.3.13
github.com/onsi/ginkgo/v2 v2.9.2
github.com/onsi/gomega v1.27.6
github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.8
github.com/pavlo-v-chernykh/keystore-go/v4 v4.4.1
github.com/prometheus/common v0.37.0
github.com/stretchr/testify v1.8.1
Expand All @@ -38,8 +38,8 @@ require (
require (
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 // indirect
golang.org/x/tools v0.9.3 // indirect
github.com/stretchr/objx v0.5.0 // indirect
golang.org/x/tools v0.7.0 // indirect
)

require (
Expand Down Expand Up @@ -114,11 +114,11 @@ require (
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
Expand Down
31 changes: 16 additions & 15 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,12 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.11.0 h1:JAKSXpt1YjtLA7YpPiqO9ss6sNXEsPfSGdwN0UHqzrw=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU=
github.com/onsi/ginkgo/v2 v2.9.2/go.mod h1:WHcJJG2dIlcCqVfBAwUCrJxSPFb6v4azBwgxeMeDuts=
github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU=
github.com/onsi/ginkgo/v2 v2.11.0/go.mod h1:ZhrRA5XmEE3x3rhlzamx/JJvujdZoJ2uvgI7kR0iZvM=
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE=
github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg=
github.com/onsi/gomega v1.27.8 h1:gegWiwZjBsf2DgiSbf5hpokZ98JVDMcWkUiigk6/KXc=
github.com/onsi/gomega v1.27.8/go.mod h1:2J8vzI/s+2shY9XHRApDkdgPo1TKT7P2u6fXeJKFnNQ=
github.com/pavlo-v-chernykh/keystore-go/v4 v4.4.1 h1:FyBdsRqqHH4LctMLL+BL2oGO+ONcIPwn96ctofCVtNE=
github.com/pavlo-v-chernykh/keystore-go/v4 v4.4.1/go.mod h1:lAVhWwbNaveeJmxrxuSTxMgKpF6DjnuVpn6T8WiBwYQ=
github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
Expand Down Expand Up @@ -535,6 +535,7 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -578,8 +579,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.0.0-20220725212005-46097bf591d3/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
golang.org/x/net v0.0.0-20220809184613-07c6da5e1ced/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand All @@ -602,7 +603,7 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand Down Expand Up @@ -658,13 +659,13 @@ golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.9.0 h1:KS/R3tvhPqvJvwcKfnBHJwwthS11LRhmM5D59eEXa0s=
golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -674,8 +675,8 @@ golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down Expand Up @@ -728,8 +729,8 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=
golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s=
golang.org/x/tools v0.9.3 h1:Gn1I8+64MsuTb/HpH+LmQtNas23LhUVr3rYZ0eKuaMM=
golang.org/x/tools v0.9.3/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
15 changes: 8 additions & 7 deletions tests/e2e/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ const (
zookeeperClusterName = "zookeeper-server"
managedByHelmLabelTemplate = "app.kubernetes.io/managed-by=Helm,app.kubernetes.io/instance=%s"

cruiseControlPodReadinessTimeout = 50 * time.Second
kafkaClusterResourceReadinessTimeout = 60 * time.Second
defaultDeletionTimeout = 20 * time.Second
defaultPodReadinessWaitTime = 10 * time.Second
defaultTopicCreationWaitTime = 10 * time.Second
defaultUserCreationWaitTime = 10 * time.Second
cruiseControlPodReadinessTimeout = 50 * time.Second
kafkaClusterResourceReadinessTimeout = 60 * time.Second
defaultDeletionTimeout = 20 * time.Second
defaultPodReadinessWaitTime = 10 * time.Second
defaultTopicCreationWaitTime = 10 * time.Second
defaultUserCreationWaitTime = 10 * time.Second

kafkaClusterCreateTimeout = 600 * time.Second
kafkaClusterResourceCleanupTimeout = 120 * time.Second
kcatDeleetionTimeout = 40 * time.Second
zookeeperClusterCreateTimeout = 4 * time.Minute
zookeeperClusterCreateTimeout = 7 * time.Minute // Increased from 4 to 7 for multiple kind
Kuvesz marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as on line 56, I don't think we need this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain why should we remove this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not sure what sense it makes to have the explanation for this timeout here. For giving information to reviewers it would be fine as a review comment but I don't think this needs to be a comment on the code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 that the comment "// Increased from 4 to 7 for multiple kind" can be removed since it only provides the context about why the change is made, but it doesn't provide any valuable info itself along with the source code.

Or perhaps we can change the comment to something like this:

Suggested change
zookeeperClusterCreateTimeout = 7 * time.Minute // Increased from 4 to 7 for multiple kind
// increase timeout for supporting multiple Kind clusters
zookeeperClusterCreateTimeout = 7 * time.Minute

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove but in this case who will face with this issue on multiple kind cluster on github will not know what was the original setting for one kind cluster setup.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think default values and the reason of their changes are valuable in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the increased timeout was not helped, I put back to the original value and I removed the comment
fixed: 129e7fe

zookeeperClusterResourceCleanupTimeout = 60 * time.Second
externalConsumerTimeout = 5 * time.Second
externalProducerTimeout = 5 * time.Second
Expand Down
41 changes: 26 additions & 15 deletions tests/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ require (
github.com/banzaicloud/koperator v0.25.0
github.com/cisco-open/k8s-objectmatcher v1.9.0
github.com/gruntwork-io/terratest v0.41.24
github.com/onsi/ginkgo/v2 v2.9.5
github.com/onsi/gomega v1.27.6
github.com/onsi/ginkgo/v2 v2.11.0
github.com/onsi/gomega v1.27.8
github.com/spf13/viper v1.16.0
github.com/twmb/franz-go v1.13.5
k8s.io/apiextensions-apiserver v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/apiextensions-apiserver v0.26.4
k8s.io/apimachinery v0.26.4
sigs.k8s.io/yaml v1.3.0
)

Expand All @@ -29,9 +30,11 @@ require (
github.com/eapache/queue v1.1.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/zapr v1.2.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/iancoleman/orderedmap v0.2.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
Expand All @@ -40,20 +43,27 @@ require (
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/pavlo-v-chernykh/keystore-go/v4 v4.4.1 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/tidwall/gjson v1.9.3 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/twmb/franz-go/pkg/kmsg v1.4.0 // indirect
github.com/wayneashleyberry/terminal-dimensions v1.0.0 // indirect
go.uber.org/zap v1.24.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
sigs.k8s.io/controller-runtime v0.14.6 // indirect
)

Expand Down Expand Up @@ -103,25 +113,26 @@ require (
github.com/pquerna/otp v1.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.8.1 // indirect
github.com/stretchr/testify v1.8.3 // indirect
github.com/urfave/cli v1.22.2 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.7.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sys v0.9.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.1 // indirect
golang.org/x/tools v0.9.3 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.27.2 // indirect
k8s.io/client-go v0.27.2 // indirect
k8s.io/api v0.26.4 // indirect
k8s.io/client-go v0.26.4 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
Expand Down
Loading
Loading