diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-01-29 14:17:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 14:17:40 -0800 |
commit | 961c04cae992eadb42d286d2f85f8a675bdc68c8 (patch) | |
tree | 3408f2d06f847e966c53485e2d54c692cdd037c1 /vendor/gopkg.in/olivere/elastic.v5/bulk_processor_test.go | |
parent | 8d66523ba7d9a77129844be476732ebfd5272d64 (diff) | |
download | chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.gz chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.bz2 chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.zip |
Upgrading server dependancies (#8154)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/bulk_processor_test.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/bulk_processor_test.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/bulk_processor_test.go b/vendor/gopkg.in/olivere/elastic.v5/bulk_processor_test.go index a47e99652..bb97ca217 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/bulk_processor_test.go +++ b/vendor/gopkg.in/olivere/elastic.v5/bulk_processor_test.go @@ -38,6 +38,9 @@ func TestBulkProcessorDefaults(t *testing.T) { if got, want := p.wantStats, false; got != want { t.Errorf("expected %v; got: %v", want, got) } + if p.backoff == nil { + t.Fatalf("expected non-nill backoff; got: %v", p.backoff) + } } func TestBulkProcessorCommitOnBulkActions(t *testing.T) { @@ -126,7 +129,7 @@ func TestBulkProcessorBasedOnFlushInterval(t *testing.T) { for i := 1; i <= numDocs; i++ { tweet := tweet{User: "olivere", Message: fmt.Sprintf("%d. %s", i, randomString(rand.Intn(64)))} - request := NewBulkIndexRequest().Index(testIndexName).Type("tweet").Id(fmt.Sprintf("%d", i)).Doc(tweet) + request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet) p.Add(request) } @@ -209,7 +212,7 @@ func TestBulkProcessorClose(t *testing.T) { for i := 1; i <= numDocs; i++ { tweet := tweet{User: "olivere", Message: fmt.Sprintf("%d. %s", i, randomString(rand.Intn(64)))} - request := NewBulkIndexRequest().Index(testIndexName).Type("tweet").Id(fmt.Sprintf("%d", i)).Doc(tweet) + request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet) p.Add(request) } @@ -275,7 +278,7 @@ func TestBulkProcessorFlush(t *testing.T) { for i := 1; i <= numDocs; i++ { tweet := tweet{User: "olivere", Message: fmt.Sprintf("%d. %s", i, randomString(rand.Intn(64)))} - request := NewBulkIndexRequest().Index(testIndexName).Type("tweet").Id(fmt.Sprintf("%d", i)).Doc(tweet) + request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet) p.Add(request) } @@ -356,7 +359,7 @@ func testBulkProcessor(t *testing.T, numDocs int, svc *BulkProcessorService) { for i := 1; i <= numDocs; i++ { tweet := tweet{User: "olivere", Message: fmt.Sprintf("%07d. %s", i, randomString(1+rand.Intn(63)))} - request := NewBulkIndexRequest().Index(testIndexName).Type("tweet").Id(fmt.Sprintf("%d", i)).Doc(tweet) + request := NewBulkIndexRequest().Index(testIndexName).Type("doc").Id(fmt.Sprintf("%d", i)).Doc(tweet) p.Add(request) } |