Skip to content

Commit

Permalink
Merge #31343
Browse files Browse the repository at this point in the history
31343: roachtest: apply timeouts to import/restore tests r=petermattis a=tschottdorf

Make stuck tests less expensive, in particular since 32 node clusters are involved.

Touches #31184.

Release note: None

Co-authored-by: Tobias Schottdorf <tobias.schottdorf@gmail.com>
  • Loading branch information
craig[bot] and tbg committed Oct 16, 2018
2 parents a0b7cd4 + eb0ec88 commit 773c163
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
16 changes: 12 additions & 4 deletions pkg/cmd/roachtest/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,19 @@ func registerImportTPCC(r *registry) {
}

func registerImportTPCH(r *registry) {
for _, n := range []int{4, 8, 32} {
for _, item := range []struct {
nodes int
timeout time.Duration
}{
{4, 6 * time.Hour},
{8, 4 * time.Hour},
{32, 3 * time.Hour},
} {
r.Add(testSpec{
Name: fmt.Sprintf(`import/tpch/nodes=%d`, n),
Nodes: nodes(n),
Stable: true, // DO NOT COPY to new tests
Name: fmt.Sprintf(`import/tpch/nodes=%d`, item.nodes),
Nodes: nodes(item.nodes),
Timeout: item.timeout,
Stable: true, // DO NOT COPY to new tests
Run: func(ctx context.Context, t *test, c *cluster) {
c.Put(ctx, cockroach, "./cockroach")
c.Start(ctx, t)
Expand Down
15 changes: 11 additions & 4 deletions pkg/cmd/roachtest/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,18 @@ func (dul *DiskUsageLogger) Runner(ctx context.Context) error {
}

func registerRestore(r *registry) {
for _, nodeCount := range []int{10, 32} {
for _, item := range []struct {
nodes int
timeout time.Duration
}{
{10, 6 * time.Hour},
{32, 3 * time.Hour},
} {
r.Add(testSpec{
Name: fmt.Sprintf("restore2TB/nodes=%d", nodeCount),
Nodes: nodes(nodeCount),
Stable: true, // DO NOT COPY to new tests
Name: fmt.Sprintf("restore2TB/nodes=%d", item.nodes),
Nodes: nodes(item.nodes),
Timeout: item.timeout,
Stable: true, // DO NOT COPY to new tests
Run: func(ctx context.Context, t *test, c *cluster) {
c.Put(ctx, cockroach, "./cockroach")
c.Start(ctx, t)
Expand Down

0 comments on commit 773c163

Please sign in to comment.