mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 00:25:55 +00:00
Less TestMain_Set_Quick parallel tests
This commit is contained in:
parent
17b1eeb0d0
commit
6cd8f6a970
2 changed files with 7 additions and 2 deletions
|
|
@ -279,6 +279,9 @@ func (e *Etcd) Started(ctx context.Context) error {
|
|||
}
|
||||
|
||||
func (e *Etcd) ID() string {
|
||||
if e.e == nil || e.e.Server == nil {
|
||||
return ""
|
||||
}
|
||||
return e.e.Server.ID().String()
|
||||
}
|
||||
|
||||
|
|
@ -291,6 +294,9 @@ func (e *Etcd) Peers() []*disco.Peer {
|
|||
}
|
||||
|
||||
func (e *Etcd) IsLeader() bool {
|
||||
if e.e == nil || e.e.Server == nil {
|
||||
return false
|
||||
}
|
||||
return e.e.Server.Leader() == e.e.Server.ID()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,8 +54,7 @@ func TestMain_Set_Quick(t *testing.T) {
|
|||
t.Skip("short")
|
||||
}
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
//for i := 0; i < 10; i++ {
|
||||
for i := 0; i < 10; i++ {
|
||||
t.Run(fmt.Sprint(i), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue