Skip to content

Commit

Permalink
Fix rosmar integration test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
torcolvin committed Feb 6, 2025
1 parent abb7c9b commit 26d586f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions base/main_test_bucket_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ func NewTestBucketPoolWithOptions(ctx context.Context, bucketReadierFunc TBPBuck
numBuckets := tbpNumBuckets(ctx)

preserveBuckets, _ := strconv.ParseBool(os.Getenv(tbpEnvPreserve))

tbp := TestBucketPool{
integrationMode: true,
integrationMode: !UnitTestUrlIsWalrus() && !TestUseExistingBucket(),
readyBucketPool: make(chan Bucket, numBuckets),
bucketReadierQueue: make(chan tbpBucketName, numBuckets),
bucketReadierWaitGroup: &sync.WaitGroup{},
Expand All @@ -115,13 +114,13 @@ func NewTestBucketPoolWithOptions(ctx context.Context, bucketReadierFunc TBPBuck
unclosedBuckets: make(map[string]map[string]struct{}),
useExistingBucket: TestUseExistingBucket(),
useDefaultScope: options.UseDefaultScope,
skipMobileXDCR: true, // do not set up enableCrossClusterVersioning until Sync Gateway 4.x
skipMobileXDCR: !UnitTestUrlIsWalrus(), // do not set up enableCrossClusterVersioning until Sync Gateway 4.x
numCollectionsPerBucket: numCollectionsPerBucket,
verbose: *NewAtomicBool(tbpVerbose()),
}

// We can safely skip setup if using existing buckets or rosmar buckets, since they can be opened on demand.
if UnitTestUrlIsWalrus() || TestUseExistingBucket() {
if !tbp.integrationMode {
tbp.stats.TotalBucketInitCount.Add(int32(numBuckets))
return &tbp
}
Expand Down

0 comments on commit 26d586f

Please sign in to comment.