Skip to content

Commit

Permalink
Merge #41339
Browse files Browse the repository at this point in the history
41339: roachtest: improve speed of hibernate tests r=rafiss a=rafiss

These tests do a lot of schema changes, which can make them become
slower over time. Lower the GC and job retention time (and replication
factor while we're at it) to make the tests go faster.

Release justification: test only change

Release note: None

Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
  • Loading branch information
craig[bot] and rafiss committed Oct 8, 2019
2 parents 134f535 + b5a6a1e commit 7f8687b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions pkg/cmd/roachtest/hibernate.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,37 @@ func registerHibernate(r *testRegistry) {
c.Put(ctx, cockroach, "./cockroach", c.All())
c.Start(ctx, t, c.All())

if err := repeatRunE(
ctx,
c,
node,
"change database replication and GC time",
`./cockroach sql --insecure -e
'ALTER RANGE default CONFIGURE ZONE USING num_replicas = 1, gc.ttlseconds = 120;'`,
); err != nil {
t.Fatal(err)
}
if err := repeatRunE(
ctx,
c,
node,
"change database replication and GC time",
`./cockroach sql --insecure -e
'ALTER DATABASE system CONFIGURE ZONE USING num_replicas = 1, gc.ttlseconds = 120;'`,
); err != nil {
t.Fatal(err)
}

if err := repeatRunE(
ctx,
c,
node,
"change jobs retention time",
`./cockroach sql --insecure -e 'SET CLUSTER SETTING jobs.retention_time = '180s';'`,
); err != nil {
t.Fatal(err)
}

t.Status("cloning hibernate and installing prerequisites")
latestTag, err := repeatGetLatestTag(
ctx, c, "hibernate", "hibernate-orm", hibernateReleaseTagRegex,
Expand Down

0 comments on commit 7f8687b

Please sign in to comment.