From 11cda6fd72dcf6b7efaa292233549881be12ac00 Mon Sep 17 00:00:00 2001 From: Adriel Perkins Date: Fri, 7 Feb 2025 12:43:28 -0500 Subject: [PATCH] [chore] remove equal assertion after fixing flaky test (#37778) #### Description Removes the previous assert.Equal statement that was causing the test to intermittently fail. The equal assertion was intended to be removed previously with the new logic but I missed it. Will keep an eye on this because I'm surprised I couldn't get it to happen locally (whereas before adding the new logic I could consistently get it to fail 2% of the time.) #### Link to tracking issue Fixes #34983 --- .../internal/scraper/githubscraper/helpers_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/receiver/githubreceiver/internal/scraper/githubscraper/helpers_test.go b/receiver/githubreceiver/internal/scraper/githubscraper/helpers_test.go index 670fb931adf7e..0b9c92bf03098 100644 --- a/receiver/githubreceiver/internal/scraper/githubscraper/helpers_test.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/helpers_test.go @@ -896,10 +896,8 @@ func TestEvalCommits(t *testing.T) { client := graphql.NewClient(server.URL, ghs.client) adds, dels, age, err := ghs.evalCommits(context.Background(), client, "repo1", tc.branch) - assert.Equal(t, tc.expectedAge, age) assert.Equal(t, tc.expectedDeletions, dels) assert.Equal(t, tc.expectedAdditions, adds) - // assert.WithinRange(t, age, time.tc.expectedAge, time.Now()) if tc.expectedAge != 0 { assert.WithinDuration(t, time.UnixMilli(tc.expectedAge), time.UnixMilli(age), 10*time.Second) } else {