Skip to content

Commit

Permalink
AUT-371 - Removing cleanup step and sleep from endentities testing. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcottner authored Dec 11, 2024
1 parent 7ad6804 commit 9194570
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
4 changes: 0 additions & 4 deletions database/queries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 0 additions & 12 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"testing"
"time"

"github.com/mozilla-services/autograph/database"
log "github.com/sirupsen/logrus"
)

Expand Down Expand Up @@ -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)
})

Expand Down

0 comments on commit 9194570

Please sign in to comment.