File tree Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -191,8 +191,7 @@ func main() {
191
191
192
192
if tp != nil {
193
193
// Give enough time for the root span to be exported
194
- log .Info ("Waiting for root span to be exported..." )
195
- time .Sleep (5 * time .Second )
194
+ log .Info ("exporting spans..." )
196
195
197
196
// Force a flush of any pending spans
198
197
shutdownCtx , cancel := context .WithTimeout (context .Background (), 2 * time .Second )
Original file line number Diff line number Diff line change @@ -46,14 +46,6 @@ dump_cluster_information() {
46
46
fi
47
47
}
48
48
49
- cleanup_operator () {
50
- local context=" ${1} "
51
- local namespace=" ${2} "
52
- if ! timeout 5s helm uninstall --wait --kube-context=" ${context} " -n ${namespace} mongodb-kubernetes-operator; then
53
- echo " Warning: Helm uninstall failed or timed out. Continuing anyway."
54
- fi
55
- }
56
-
57
49
cleanup_openshift_cluster (){
58
50
if [[ " ${TEST_RESULTS} " -ne 0 ]]; then
59
51
# Mark namespace as failed to be cleaned later
@@ -154,19 +146,19 @@ else
154
146
timeout --foreground " ${timeout_sec} " scripts/evergreen/e2e/single_e2e.sh || TEST_RESULTS=$?
155
147
fi
156
148
157
- dump_cluster_information
158
-
159
149
# We only have static clusters in OpenShift; otherwise, there's no need to mark and clean them up here.
160
150
if [[ " ${CLUSTER_TYPE} " == " openshift" ]]; then
151
+ dump_cluster_information
161
152
cleanup_openshift_cluster
162
153
else
163
154
if [[ " ${KUBE_ENVIRONMENT_NAME} " == " multi" ]]; then
164
155
echo " Tearing down operator on ${CENTRAL_CLUSTER} "
165
- cleanup_operator " ${CENTRAL_CLUSTER} " " ${NAMESPACE} "
156
+ delete_operator " ${NAMESPACE} "
166
157
else
167
158
# If the test passed, then the namespace is removed
168
- cleanup_operator " $( kubectl config current-context ) " " ${NAMESPACE} "
159
+ delete_operator " ${NAMESPACE} "
169
160
fi
161
+ dump_cluster_information
170
162
fi
171
163
172
164
Original file line number Diff line number Diff line change 42
42
43
43
delete_operator () {
44
44
local ns=" $1 "
45
- local name=${OPERATOR_NAME:= mongodb-enterprise -operator}
45
+ local name=${OPERATOR_NAME:= mongodb-kubernetes -operator}
46
46
47
47
title " Removing the Operator deployment ${name} "
48
- ! kubectl --namespace " ${ns} " get deployments | grep -q " ${name} " \
49
- || kubectl delete deployment " ${name} " -n " ${ns} " || true
48
+ kubectl delete deployment " ${name} " -n " ${ns} " --wait=true --timeout=10|| true
50
49
}
51
50
52
51
# wait_for_operator waits for the Operator to start
You can’t perform that action at this time.
0 commit comments