Skip to content

Commit

Permalink
fix(test): Fix scalingengine_sqldb_test.go
Browse files Browse the repository at this point in the history
# Issue

The ScalingEngineSqldb tests had become flaky

# Fix

A well-meaning but harmfull test cleanup function was removed.
  • Loading branch information
silvestre committed Aug 28, 2024
1 parent 7d732de commit 94416f2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/autoscaler/db/sqldb/scalingengine_sqldb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ var _ = Describe("ScalingEngineSqldb", func() {
cleanupForApp(appId)
cleanupForApp(appId2)
cleanupForApp(appId3)
cleanUpCooldownTable()
DeferCleanup(func() {
cleanupForApp(appId)
cleanupForApp(appId2)
cleanupForApp(appId3)
cleanUpCooldownTable()
})
})

Expand Down
5 changes: 0 additions & 5 deletions src/autoscaler/db/sqldb/sqldb_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,6 @@ func removeCooldownForApp(appId string) {
FailOnError("can not remove scalingcooldown for app", err)
}

func cleanUpCooldownTable() {
_, err := dbHelper.Exec("DELETE from scalingcooldown")
FailOnError("can not clean table scalingcooldown", err)
}

func removeActiveScheduleForApp(appId string) {
query := dbHelper.Rebind("DELETE from activeschedule where appId = ?")
_, err := dbHelper.Exec(query, appId)
Expand Down

0 comments on commit 94416f2

Please sign in to comment.