Skip to content

Commit

Permalink
remember to init tests at beginning of each test to make sure
Browse files Browse the repository at this point in the history
data is loaded
factor in the eshost size when looking at size of data sent.
  • Loading branch information
mattbaird committed Jul 10, 2014
1 parent 10f8b22 commit 70f338d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/clusternodesinfo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
)

func TestGetAll(t *testing.T) {
InitTests(true)
c := NewConn()
nodesInfo, err := c.AllNodesInfo()
//log.Println(out)
Expand Down
4 changes: 2 additions & 2 deletions lib/corebulk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ func TestBulkIndexerBasic(t *testing.T) {
return len(buffers) > 0
}, 5)
// part of request is url, so lets factor that in
//totalBytesSent = totalBytesSent - len(*eshost)
totalBytesSent = totalBytesSent - len(*eshost)
assert.T(t, len(buffers) == 1, fmt.Sprintf("Should have sent one operation but was %d", len(buffers)))
assert.T(t, indexer.NumErrors() == 0 && err == nil, fmt.Sprintf("Should not have any errors. NumErrors: %v, err:%v", indexer.NumErrors(), err))
expectedBytes := 160
expectedBytes := 151
assert.T(t, totalBytesSent == expectedBytes, fmt.Sprintf("Should have sent %v bytes but was %v", expectedBytes, totalBytesSent))

err = indexer.Index("users", "user", "2", "", nil, data, true)
Expand Down

0 comments on commit 70f338d

Please sign in to comment.