From 919457031c556cb6f3a5c05db26e9bb4cc3a8d72 Mon Sep 17 00:00:00 2001 From: Alex Cottner <148472676+alexcottner@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:41:54 -0700 Subject: [PATCH] AUT-371 - Removing cleanup step and sleep from endentities testing. (#1081) --- database/queries_test.go | 4 ---- main_test.go | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/database/queries_test.go b/database/queries_test.go index 80a84de75..ce0e07e0e 100644 --- a/database/queries_test.go +++ b/database/queries_test.go @@ -57,10 +57,6 @@ func TestConcurrentEndEntityOperations(t *testing.T) { func waitAndMakeEE(j int, db *Handler, wg *sync.WaitGroup, t *testing.T, signerID string) string { defer wg.Done() t.Logf("TestConcurrentEndEntityOperations: starting routine %d", j) - // sleep until the next 10s, then start - nextTime := time.Now().Truncate(10 * time.Second) - nextTime = nextTime.Add(10 * time.Second) - time.Sleep(time.Until(nextTime)) label, _, err := db.GetLabelOfLatestEE(signerID, 15*time.Second) switch err { diff --git a/main_test.go b/main_test.go index 50acb1bcd..ab4a3e2a9 100644 --- a/main_test.go +++ b/main_test.go @@ -12,7 +12,6 @@ import ( "testing" "time" - "github.com/mozilla-services/autograph/database" log "github.com/sirupsen/logrus" ) @@ -51,17 +50,6 @@ func newTestAutographer(t *testing.T) (*autographer, configuration) { } t.Cleanup(func() { - host := database.GetTestDBHost() - db, err := database.Connect(database.Config{ - Name: "autograph", - User: "myautographdbuser", - Password: "myautographdbpassword", - Host: host + ":5432", - MonitorPollInterval: 10 * time.Second, - }) - if err == nil { - db.Exec("truncate table endentities;") - } close(ag.exit) })