From e05655c316016ee5627896d29989c8cc47e54e5b Mon Sep 17 00:00:00 2001 From: Hannah Kim Date: Mon, 3 Feb 2025 09:27:53 -0500 Subject: [PATCH] create flaky test and call quality gates --- .github/actions/dd-ci-upload/action.yml | 4 ++++ ddtrace/tracer/tracer_test.go | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/.github/actions/dd-ci-upload/action.yml b/.github/actions/dd-ci-upload/action.yml index c9da152c47..f5c252df66 100644 --- a/.github/actions/dd-ci-upload/action.yml +++ b/.github/actions/dd-ci-upload/action.yml @@ -53,3 +53,7 @@ runs: --service ${{ inputs.service }} \ --tags "${{ inputs.tags }}" \ ${{ inputs.files }} + + - name: Activate Quality Gates + shell: bash + run: datadog-ci gate evaluate diff --git a/ddtrace/tracer/tracer_test.go b/ddtrace/tracer/tracer_test.go index dd1820621e..418140f9ba 100644 --- a/ddtrace/tracer/tracer_test.go +++ b/ddtrace/tracer/tracer_test.go @@ -13,6 +13,7 @@ import ( "errors" "fmt" "io" + "math/rand" "net/http" "net/http/httptest" "os" @@ -75,6 +76,14 @@ var ( integration bool ) +// This test is meant to flake. We are using this to test quality gates. +// TODO : REMOVE THIS TEST BEFORE MERGING +func TestFlaky(t *testing.T) { + n := rand.Intn(2) + assert.Equal(t, n, 0) + +} + func TestMain(m *testing.M) { if maininternal.BoolEnv("DD_APPSEC_ENABLED", false) { // things are slower with AppSec; double wait times