mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 08:35:55 +00:00
remove premature configuration of Txsrc in test config
This commit is contained in:
parent
d23ea94ec0
commit
f5688fa700
2 changed files with 7 additions and 9 deletions
13
index.go
13
index.go
|
|
@ -85,19 +85,20 @@ func NewIndex(holder *Holder, path, name string) (*Index, error) {
|
|||
// Warning: won't work for the tests to say:
|
||||
// txsrc := holder.Opts.Txsrc // WILL BREAK TESTS
|
||||
|
||||
// For *most* of the tests and in a production pilosa server run, we expect that
|
||||
// if holder.opts.Txsrc is set, it will be the exact same as PILOSA_TXSRC.
|
||||
// Unfortunately there are some tests where that won't hold.
|
||||
// So if the env var PILOSA_TXSRC *is* set, we always give it precedence.
|
||||
// This lets `PILOSA_TXSRC=rbf go test -v -run "one_of_my_RBF_tests"` succeed.
|
||||
if txsrc == "" {
|
||||
// nothing in the env for PILOSA_TXSRC; therefore not running under a "make topt.badger" for example.
|
||||
// nothing in the env for PILOSA_TXSRC; therefore not running under a "make topt.rbf" for example.
|
||||
if holder.Opts.Txsrc != "" {
|
||||
// most of the tests and production run, we expect that if holder.opts.Txsrc is set, it
|
||||
// will be the exact same as PILOSA_TXSRC. Unfortunately there are tests where that won't hold.
|
||||
// So if the env var PILOSA_TXSRC *is* set, we always give it precedence.
|
||||
// This lets `PILOSA_TXSRC=rbf go test -v -run "one_of_my_RBF_tests"` succeed.
|
||||
//
|
||||
txsrc = holder.Opts.Txsrc
|
||||
} else {
|
||||
txsrc = DefaultTxsrc
|
||||
}
|
||||
}
|
||||
|
||||
txf, err := newTxFactory(txsrc, path)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "creating newTxFactory")
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/pilosa/pilosa/v2"
|
||||
"github.com/pilosa/pilosa/v2/gossip"
|
||||
"github.com/pilosa/pilosa/v2/toml"
|
||||
"github.com/pkg/errors"
|
||||
|
|
@ -236,8 +235,6 @@ func NewConfig() *Config {
|
|||
c.Profile.BlockRate = 10000000 // 1 sample per 10 ms
|
||||
c.Profile.MutexFraction = 100 // 1% sampling
|
||||
|
||||
c.Txsrc = pilosa.DefaultTxsrc
|
||||
|
||||
return c
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue