Skip to content

Commit a171423

Browse files
committed
try out dumping
1 parent 1582a94 commit a171423

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ func main() {
191191

192192
if tp != nil {
193193
// 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...")
196195

197196
// Force a flush of any pending spans
198197
shutdownCtx, cancel := context.WithTimeout(context.Background(), 2*time.Second)

scripts/evergreen/e2e/e2e.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,6 @@ dump_cluster_information() {
4646
fi
4747
}
4848

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-
5749
cleanup_openshift_cluster(){
5850
if [[ "${TEST_RESULTS}" -ne 0 ]]; then
5951
# Mark namespace as failed to be cleaned later
@@ -154,19 +146,19 @@ else
154146
timeout --foreground "${timeout_sec}" scripts/evergreen/e2e/single_e2e.sh || TEST_RESULTS=$?
155147
fi
156148

157-
dump_cluster_information
158-
159149
# We only have static clusters in OpenShift; otherwise, there's no need to mark and clean them up here.
160150
if [[ "${CLUSTER_TYPE}" == "openshift" ]]; then
151+
dump_cluster_information
161152
cleanup_openshift_cluster
162153
else
163154
if [[ "${KUBE_ENVIRONMENT_NAME}" == "multi" ]]; then
164155
echo "Tearing down operator on ${CENTRAL_CLUSTER}"
165-
cleanup_operator "${CENTRAL_CLUSTER}" "${NAMESPACE}"
156+
delete_operator "${NAMESPACE}"
166157
else
167158
# If the test passed, then the namespace is removed
168-
cleanup_operator "$(kubectl config current-context)" "${NAMESPACE}"
159+
delete_operator "${NAMESPACE}"
169160
fi
161+
dump_cluster_information
170162
fi
171163

172164

scripts/funcs/kubernetes

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ EOF
4242

4343
delete_operator() {
4444
local ns="$1"
45-
local name=${OPERATOR_NAME:=mongodb-enterprise-operator}
45+
local name=${OPERATOR_NAME:=mongodb-kubernetes-operator}
4646

4747
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
5049
}
5150

5251
# wait_for_operator waits for the Operator to start

0 commit comments

Comments
 (0)