rgrove/node-elastical

Online test failures - bulk (when index Exists) and putMapping (with no index)

Closed this issue · 4 comments

I've pulled the latest release from git and ran the test cases, I've been looking at your code to try and work around a problem we have with null data inserting into Elastical....before I start trying things I wanted to make sure the tests all currently passed...I am getting a failure on the bulk and putMapping methods as per below:

~/Documents/gitrepo/node-elastical$ make test
node_modules/.bin/vows tests/offline-tests.js
··················································································· 
✓ OK » 83 honored (0.015s)
node_modules/.bin/vows tests/online-tests.js
·✗··························✗·········· 


 Client bulk() when the index exists
   ✗ should succeed
     » expected true, got undefined // online-tests.js:37

 Client putMapping() with no index
   ✗ should succeed
     » expected null, got {
   stack: 'Error: MergeMappingException[Merge failed with failures {[mapper [message] has different store values]}]\n    at    Error (unknown source)\n    at Request.callback (/Users/kbenedict/Documents/gitrepo/node-elastical/lib/client.js:663:26)\n    at Request.<anonymous> (/Users/kbenedict/Documents/gitrepo/node-elastical/node_modules/request/main.js:314:21)\n    at Request.emit (events.js:64:17)\n    at IncomingMessage.<anonymous> (/Users/kbenedict/Documents/gitrepo/node-elastical/node_modules/request/main.js:295:19)\n    at IncomingMessage.emit (events.js:81:20)\n    at HTTPParser.onMessageComplete (http.js:133:23)\n    at Socket.ondata (http.js:1231:22)\n    at Socket._onReadable (net.js:683:27)\n    at IOWatcher.onReadable [as callback] (net.js:177:10)',
   arguments: undefined,
   type: undefined,
   message: 'MergeMappingException[Merge failed with failures {[mapper [message] has different store values]}]'
} // online-tests.js:379
✗ Broken » 37 honored ∙ 2 broken (0.168s)
make: *** [online-tests] Error 1
~/Documents/gitrepo/node-elastical$ 

One other item to note and I'll tag it in here as it relates to testing. In the teardown script, the last entry has the following:

 curl -s -XDELETE "$BASE/_percolator//elastical-test-percolator-index/elastical-test-percolator-delete"

Note the double forward slash in the url ------------^

What version of ElasticSearch are you running?

I noticed a while back that the bulk() test would fail intermittently due to an apparent race condition in ElasticSearch itself. All the tests are run in parallel, and depending on the order of operations, it seemed like ElasticSearch sometimes choked even though the tests have no interdependencies. I thought I had worked around this (the tests all pass consistently for me now), but maybe not.

From -v output

ElasticSearch Version: 0.17.5 (2011-08-12T12:13:16), JVM: 20.1-b02-384

Maybe something in a newer version, which I have on an ec2 instance, but on my mac book pro,I had installed this with homebrew and I see they are a few minor versions behind in that package. May just remove and pull the current to make sure I'm not having issues there...you may already be able to tell me there is :)

I've moved the package homebrew gave me and pulled down

ElasticSearch Version: 0.17.8 (2011-10-06T21:07:31), JVM: 20.1-b02-384

Everything passes, so obviously an issue with the older version....I have this running under a folder Current symlinked so when I point to the older version it breaks again....then back to newer we are good. I have not regression checked earlier versions between 0.17.5 and 0.17.8 but I'd consider this to not be an issue any longer :)

Good to hear. Thanks!