Skip to content

Commit

Permalink
fix TTL issue in load test
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier committed Mar 14, 2024
1 parent 9834285 commit 7ac2fb7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion integration-tests/load/automationv2_1/automationv2_1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Load Config:
}

testEnvironment := environment.New(&environment.Config{
TTL: loadDuration + time.Hour*6,
TTL: loadDuration.Round(time.Hour) + time.Hour,
NamespacePrefix: fmt.Sprintf(
"automation-%s-%s",
testType,
Expand Down Expand Up @@ -712,6 +712,16 @@ Test Duration: %s`
t.Cleanup(func() {
if err = actions.TeardownRemoteSuite(t, testEnvironment.Cfg.Namespace, chainlinkNodes, nil, &loadedTestConfig, chainClient); err != nil {
l.Error().Err(err).Msg("Error when tearing down remote suite")
testEnvironment.Cfg.TTL = time.Hour * 48
err := testEnvironment.Run()
if err != nil {
l.Error().Err(err).Msg("Error increasing TTL of namespace")
}
} else if chainClient.NetworkSimulated() {
err := testEnvironment.Client.RemoveNamespace(testEnvironment.Cfg.Namespace)
if err != nil {
l.Error().Err(err).Msg("Error removing namespace")
}
}
})

Expand Down

0 comments on commit 7ac2fb7

Please sign in to comment.