Skip to content

Commit

Permalink
Added panic is not using a leaky bucket£
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacLambat committed Aug 5, 2022
1 parent 65609e4 commit 171629d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rest/utilities_testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ func (rt *RestTester) Bucket() base.Bucket {
leakyBucket, isLeaky := base.AsLeakyBucket(testBucket)
if isLeaky {
leakyBucket.SetIgnoreClose(true)
} else {
panic("Using option useLeakyTBForDB but testBucket is not a leaky bucket")
}

_, err = rt.RestTesterServerContext.AddDatabaseFromConfigWithConnectFn(*rt.DatabaseConfig, func(spec base.BucketSpec) (base.Bucket, error) {
Expand Down

0 comments on commit 171629d

Please sign in to comment.