Browse Source

Call _refresh to ensure index is refreshed before getting the status

tags/v1.0.0
Paul Bonser 9 years ago
parent
commit
7a434d562f
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      goes_test.go

+ 4
- 1
goes_test.go View File

@@ -5,13 +5,14 @@
package goes package goes


import ( import (
. "gopkg.in/check.v1"
"net/http" "net/http"
"net/url" "net/url"
"os" "os"
"strings" "strings"
"testing" "testing"
"time" "time"

. "gopkg.in/check.v1"
) )


var ( var (
@@ -787,6 +788,8 @@ func (s *GoesTestSuite) TestIndexStatus(c *C) {


// gives ES some time to do its job // gives ES some time to do its job
time.Sleep(1 * time.Second) time.Sleep(1 * time.Second)
_, err = conn.RefreshIndex(indexName)
c.Assert(err, IsNil)


response, err := conn.IndexStatus([]string{"testindexstatus"}) response, err := conn.IndexStatus([]string{"testindexstatus"})
c.Assert(err, IsNil) c.Assert(err, IsNil)


Loading…
Cancel
Save