mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-10 15:01:03 +00:00
limit httpclient instances on executor tests
This commit is contained in:
parent
f051f7ccea
commit
e7d64c4f48
1 changed files with 8 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package test
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/pilosa/pilosa"
|
||||
|
|
@ -12,10 +13,16 @@ type Executor struct {
|
|||
*pilosa.Executor
|
||||
}
|
||||
|
||||
var remoteClient *http.Client
|
||||
|
||||
func init() {
|
||||
remoteClient = pilosa.GetHTTPClient(nil)
|
||||
}
|
||||
|
||||
// NewExecutor returns a new instance of Executor.
|
||||
// The executor always matches the hostname of the first cluster node.
|
||||
func NewExecutor(holder *pilosa.Holder, cluster *pilosa.Cluster) *Executor {
|
||||
executor := pilosa.NewExecutor(pilosa.GetHTTPClient(nil))
|
||||
executor := pilosa.NewExecutor(remoteClient)
|
||||
e := &Executor{Executor: executor}
|
||||
e.Holder = holder
|
||||
e.Cluster = cluster
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue