{"action":"created","issue":{"url":"https://api.github.com/repos/toptal/chewy/issues/141","labels_url":"https://api.github.com/repos/toptal/chewy/issues/141/labels{/name}","comments_url":"https://api.github.com/repos/toptal/chewy/issues/141/comments","events_url":"https://api.github.com/repos/toptal/chewy/issues/141/events","html_url":"https://github.com/toptal/chewy/issues/141","id":63649363,"number":141,"title":"One spec fails on my computer (import_spec.rb:156)","user":{"login":"DNNX","id":447953,"avatar_url":"https://avatars.githubusercontent.com/u/447953?v=3","gravatar_id":"","url":"https://api.github.com/users/DNNX","html_url":"https://github.com/DNNX","followers_url":"https://api.github.com/users/DNNX/followers","following_url":"https://api.github.com/users/DNNX/following{/other_user}","gists_url":"https://api.github.com/users/DNNX/gists{/gist_id}","starred_url":"https://api.github.com/users/DNNX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNNX/subscriptions","organizations_url":"https://api.github.com/users/DNNX/orgs","repos_url":"https://api.github.com/users/DNNX/repos","events_url":"https://api.github.com/users/DNNX/events{/privacy}","received_events_url":"https://api.github.com/users/DNNX/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-23T07:31:00Z","updated_at":"2015-03-23T07:43:10Z","closed_at":null,"body":"Hi,\r\n\r\nI checked out the latest master branch (8716b732efa7ef5d4b1a8f0606f1850484824bc8, to be exact), ran `bundle install && bundle exec rake` and stumbled a single test failure:\r\n\r\n```\r\n$ bundle exec rspec ./spec/chewy/type/import_spec.rb:156\r\n-- create_table(:countries)\r\n   -> 0.0033s\r\n-- create_table(:cities)\r\n   -> 0.0005s\r\nRun options:\r\n  include {:locations=>{\"./spec/chewy/type/import_spec.rb\"=>[156]}}\r\n  exclude {:mongoid=>true}\r\n\r\nRandomized with seed 12426\r\nF\r\n\r\nFailures:\r\n\r\n  1) Chewy::Type::Import.import instrumentation payload  should eq {:type=>CitiesIndex::City, :errors=>{:index=>{\"MapperParsingException[object mapping for [city] tried to parse field [name] as object, but got EOF, has a concrete value been provided to it?]\"=>[\"1\", \"2\", \"3\"]}}, :import=>{:index=>3}}\r\n     Failure/Error: expect(outer_payload).to eq({\r\n\r\n       expected: {:type=>CitiesIndex::City, :errors=>{:index=>{\"MapperParsingException[object mapping for [city] tried to parse field [name] as object, but got EOF, has a concrete value been provided to it?]\"=>[\"1\", \"2\", \"3\"]}}, :import=>{:index=>3}}\r\n            got: {:type=>CitiesIndex::City, :import=>{:index=>3}, :errors=>{:index=>{\"MapperParsingException[object mapping for [city] tried to parse as object, but got EOF, has a concrete value been provided to it?]\"=>[\"1\", \"2\", \"3\"]}}}\r\n\r\n       (compared using ==)\r\n\r\n       Diff:\r\n       @@ -1,4 +1,4 @@\r\n       -:errors => {:index=>{\"MapperParsingException[object mapping for [city] tried to parse field [name] as object, but got EOF, has a concrete value been provided to it?]\"=>[\"1\", \"2\", \"3\"]}},\r\n       +:errors => {:index=>{\"MapperParsingException[object mapping for [city] tried to parse as object, but got EOF, has a concrete value been provided to it?]\"=>[\"1\", \"2\", \"3\"]}},\r\n```\r\n\r\nIt worth noting that I also changed 9250 to 9200 in chewy.yml and spec_helper.rb bacause I'm too lazy to google^w duckduckgo how to run 2 instances of elasticsearch simultaneously on different ports. But anyway, I don't think that these two little changes is the reason why the test fail. I suspect that the real reason is that my ES version might be different from yours, and it might produce a different error message.\r\n\r\n```\r\n$ curl 127.0.0.1:9200\\?pretty=true\r\n{\r\n  \"status\" : 200,\r\n  \"name\" : \"Authority\",\r\n  \"version\" : {\r\n    \"number\" : \"1.3.4\",\r\n    \"build_hash\" : \"a70f3ccb52200f8f2c87e9c370c6597448eb3e45\",\r\n    \"build_timestamp\" : \"2014-09-30T09:07:17Z\",\r\n    \"build_snapshot\" : false,\r\n    \"lucene_version\" : \"4.9\"\r\n  },\r\n  \"tagline\" : \"You Know, for Search\"\r\n}\r\n```\r\n\r\nOr maybe it's the different versions of the elasticsearch-ruby gem. Here's my Gemfile.lock:\r\n\r\n```\r\nPATH\r\n  remote: .\r\n  specs:\r\n    chewy (0.6.2)\r\n      activesupport (>= 3.2)\r\n      elasticsearch (>= 1.0.0)\r\n\r\nGEM\r\n  remote: https://rubygems.org/\r\n  specs:\r\n    activemodel (4.2.1)\r\n      activesupport (= 4.2.1)\r\n      builder (~> 3.1)\r\n    activerecord (4.2.1)\r\n      activemodel (= 4.2.1)\r\n      activesupport (= 4.2.1)\r\n      arel (~> 6.0)\r\n    activesupport (4.2.1)\r\n      i18n (~> 0.7)\r\n      json (~> 1.7, >= 1.7.7)\r\n      minitest (~> 5.1)\r\n      thread_safe (~> 0.3, >= 0.3.4)\r\n      tzinfo (~> 1.1)\r\n    ansi (1.5.0)\r\n    appraisal (1.0.3)\r\n      bundler\r\n      rake\r\n      thor (>= 0.14.0)\r\n    arel (6.0.0)\r\n    builder (3.2.2)\r\n    celluloid (0.16.0)\r\n      timers (~> 4.0.0)\r\n    coderay (1.1.0)\r\n    database_cleaner (1.3.0)\r\n    diff-lcs (1.2.5)\r\n    elasticsearch (1.0.8)\r\n      elasticsearch-api (= 1.0.7)\r\n      elasticsearch-transport (= 1.0.7)\r\n    elasticsearch-api (1.0.7)\r\n      multi_json\r\n    elasticsearch-extensions (0.0.18)\r\n      ansi\r\n      ruby-prof\r\n    elasticsearch-transport (1.0.7)\r\n      faraday\r\n      multi_json\r\n    faraday (0.9.1)\r\n      multipart-post (>= 1.2, < 3)\r\n    ffi (1.9.8)\r\n    formatador (0.2.5)\r\n    guard (2.12.5)\r\n      formatador (>= 0.2.4)\r\n      listen (~> 2.7)\r\n      lumberjack (~> 1.0)\r\n      nenv (~> 0.1)\r\n      notiffany (~> 0.0)\r\n      pry (>= 0.9.12)\r\n      shellany (~> 0.0)\r\n      thor (>= 0.18.1)\r\n    guard-compat (1.2.1)\r\n    guard-rspec (4.5.0)\r\n      guard (~> 2.1)\r\n      guard-compat (~> 1.1)\r\n      rspec (>= 2.99.0, < 4.0)\r\n    hitimes (1.2.2)\r\n    i18n (0.7.0)\r\n    json (1.8.2)\r\n    listen (2.9.0)\r\n      celluloid (>= 0.15.2)\r\n      rb-fsevent (>= 0.9.3)\r\n      rb-inotify (>= 0.9)\r\n    lumberjack (1.0.9)\r\n    method_source (0.8.2)\r\n    minitest (5.5.1)\r\n    multi_json (1.11.0)\r\n    multipart-post (2.0.0)\r\n    nenv (0.2.0)\r\n    notiffany (0.0.6)\r\n      nenv (~> 0.1)\r\n      shellany (~> 0.0)\r\n    pry (0.10.1)\r\n      coderay (~> 1.1.0)\r\n      method_source (~> 0.8.1)\r\n      slop (~> 3.4)\r\n    rake (10.4.2)\r\n    rb-fsevent (0.9.4)\r\n    rb-inotify (0.9.5)\r\n      ffi (>= 0.5.0)\r\n    rspec (3.2.0)\r\n      rspec-core (~> 3.2.0)\r\n      rspec-expectations (~> 3.2.0)\r\n      rspec-mocks (~> 3.2.0)\r\n    rspec-collection_matchers (1.1.2)\r\n      rspec-expectations (>= 2.99.0.beta1)\r\n    rspec-core (3.2.2)\r\n      rspec-support (~> 3.2.0)\r\n    rspec-expectations (3.2.0)\r\n      diff-lcs (>= 1.2.0, < 2.0)\r\n      rspec-support (~> 3.2.0)\r\n    rspec-its (1.2.0)\r\n      rspec-core (>= 3.0.0)\r\n      rspec-expectations (>= 3.0.0)\r\n    rspec-mocks (3.2.1)\r\n      diff-lcs (>= 1.2.0, < 2.0)\r\n      rspec-support (~> 3.2.0)\r\n    rspec-support (3.2.2)\r\n    ruby-prof (0.15.6)\r\n    shellany (0.0.1)\r\n    slop (3.6.0)\r\n    sqlite3 (1.3.10)\r\n    thor (0.19.1)\r\n    thread_safe (0.3.5)\r\n    timers (4.0.1)\r\n      hitimes\r\n    tzinfo (1.2.2)\r\n      thread_safe (~> 0.1)\r\n\r\nPLATFORMS\r\n  ruby\r\n\r\nDEPENDENCIES\r\n  activerecord\r\n  appraisal\r\n  chewy!\r\n  database_cleaner (~> 1.3.0)\r\n  elasticsearch-extensions\r\n  guard\r\n  guard-rspec\r\n  rake\r\n  rspec\r\n  rspec-collection_matchers\r\n  rspec-its\r\n  sqlite3\r\n```\r\n\r\nNot sure how to fix this issue correctly, please let me know if you have any suggestions.\r\n"},"comment":{"url":"https://api.github.com/repos/toptal/chewy/issues/comments/84861694","html_url":"https://github.com/toptal/chewy/issues/141#issuecomment-84861694","issue_url":"https://api.github.com/repos/toptal/chewy/issues/141","id":84861694,"user":{"login":"DNNX","id":447953,"avatar_url":"https://avatars.githubusercontent.com/u/447953?v=3","gravatar_id":"","url":"https://api.github.com/users/DNNX","html_url":"https://github.com/DNNX","followers_url":"https://api.github.com/users/DNNX/followers","following_url":"https://api.github.com/users/DNNX/following{/other_user}","gists_url":"https://api.github.com/users/DNNX/gists{/gist_id}","starred_url":"https://api.github.com/users/DNNX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNNX/subscriptions","organizations_url":"https://api.github.com/users/DNNX/orgs","repos_url":"https://api.github.com/users/DNNX/repos","events_url":"https://api.github.com/users/DNNX/events{/privacy}","received_events_url":"https://api.github.com/users/DNNX/received_events","type":"User","site_admin":false},"created_at":"2015-03-23T07:43:10Z","updated_at":"2015-03-23T07:43:10Z","body":"Will do, thanks. BTW, is it normal that the full test run takes several minutes? Are there any performance tests or something?"}}