@@ -17,23 +17,18 @@ import (
1717 "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
1818 "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
1919 "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
20- "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
2120 "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
2221 "github.com/cockroachdb/cockroach/pkg/roachprod/install"
2322 "github.com/cockroachdb/errors"
2423)
2524
26- // we need to hardcode the random seed when loading fixtures since
27- // that references a static bucket in GCS
28- const fixturesRandomSeed = 1
29-
3025func registerCopy (r registry.Registry ) {
3126 // This test imports a fully-populated Bank table. It then creates an empty
3227 // Bank schema. Finally, it performs a series of `INSERT ... SELECT ...`
3328 // statements to copy all data from the first table into the second table.
3429 runCopy := func (ctx context.Context , t test.Test , c cluster.Cluster , rows int , inTxn bool ) {
3530 // payload is the size of the payload column for each row in the Bank
36- // table. If this is adjusted, a new fixture may need to be generated.
31+ // table.
3732 const payload = 100
3833 // rowOverheadEstimate is an estimate of the overhead of a single
3934 // row in the Bank table, not including the size of the payload
@@ -58,10 +53,10 @@ func registerCopy(r registry.Registry) {
5853 return errors .Wrap (err , "disabling load-based splitting" )
5954 }
6055
61- t .Status ("importing Bank fixture " )
56+ t .Status ("importing bank table " )
6257 c .Run (ctx , option .WithNodes (c .Node (1 )), fmt .Sprintf (
63- "./cockroach workload fixtures load bank --rows=%d --payload-bytes=%d --seed %d {pgurl:1}" ,
64- rows , payload , fixturesRandomSeed ))
58+ "./cockroach workload init bank --data-loader=IMPORT -- rows=%d --payload-bytes=%d --seed 123 {pgurl:1}" ,
59+ rows , payload ))
6560 if _ , err := db .Exec ("ALTER TABLE bank.bank RENAME TO bank.bank_orig" ); err != nil {
6661 t .Fatalf ("failed to rename table: %v" , err )
6762 }
@@ -175,13 +170,11 @@ func registerCopy(r registry.Registry) {
175170 for _ , tc := range testcases {
176171 tc := tc
177172 r .Add (registry.TestSpec {
178- Name : fmt .Sprintf ("copy/bank/rows=%d,nodes=%d,txn=%t" , tc .rows , tc .nodes , tc .txn ),
179- Owner : registry .OwnerKV ,
180- Cluster : r .MakeClusterSpec (tc .nodes ),
181- // Uses gs://cockroach-fixtures-us-east1. See:
182- // https://github.com/cockroachdb/cockroach/issues/105968
183- CompatibleClouds : registry .Clouds (spec .GCE , spec .Local ),
173+ Name : fmt .Sprintf ("copy/bank/rows=%d,nodes=%d,txn=%t" , tc .rows , tc .nodes , tc .txn ),
174+ Owner : registry .OwnerKV ,
175+ Cluster : r .MakeClusterSpec (tc .nodes ),
184176 Suites : registry .Suites (registry .Nightly ),
177+ CompatibleClouds : registry .AllClouds ,
185178 Leases : registry .MetamorphicLeases ,
186179 Run : func (ctx context.Context , t test.Test , c cluster.Cluster ) {
187180 runCopy (ctx , t , c , tc .rows , tc .txn )
0 commit comments