@@ -17,23 +17,18 @@ import (
17
17
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster"
18
18
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option"
19
19
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry"
20
- "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec"
21
20
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
22
21
"github.com/cockroachdb/cockroach/pkg/roachprod/install"
23
22
"github.com/cockroachdb/errors"
24
23
)
25
24
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
-
30
25
func registerCopy (r registry.Registry ) {
31
26
// This test imports a fully-populated Bank table. It then creates an empty
32
27
// Bank schema. Finally, it performs a series of `INSERT ... SELECT ...`
33
28
// statements to copy all data from the first table into the second table.
34
29
runCopy := func (ctx context.Context , t test.Test , c cluster.Cluster , rows int , inTxn bool ) {
35
30
// 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.
37
32
const payload = 100
38
33
// rowOverheadEstimate is an estimate of the overhead of a single
39
34
// row in the Bank table, not including the size of the payload
@@ -58,10 +53,10 @@ func registerCopy(r registry.Registry) {
58
53
return errors .Wrap (err , "disabling load-based splitting" )
59
54
}
60
55
61
- t .Status ("importing Bank fixture " )
56
+ t .Status ("importing bank table " )
62
57
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 ))
65
60
if _ , err := db .Exec ("ALTER TABLE bank.bank RENAME TO bank.bank_orig" ); err != nil {
66
61
t .Fatalf ("failed to rename table: %v" , err )
67
62
}
@@ -175,13 +170,11 @@ func registerCopy(r registry.Registry) {
175
170
for _ , tc := range testcases {
176
171
tc := tc
177
172
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 ),
184
176
Suites : registry .Suites (registry .Nightly ),
177
+ CompatibleClouds : registry .AllClouds ,
185
178
Leases : registry .MetamorphicLeases ,
186
179
Run : func (ctx context.Context , t test.Test , c cluster.Cluster ) {
187
180
runCopy (ctx , t , c , tc .rows , tc .txn )
0 commit comments