Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3609

MongoDB 2.6 bit operation specs

    • Type: Icon: Task Task
    • Resolution: Done
    • 4.0.0 final
    • Affects Version/s: None
    • Component/s: None
    • None

      I'm planing to deploy mongodb 2.6 on production, so I run mongoid full spec on the 2.6.

      It seems that in mongoDB 2.6 when you do a bit operation to a nil value, it will cast the nil to 1.
      I run the full spec suit on 2.6.0 and only 3 specs failed, which is not bad at all. it run quite faster than on 2.4.10

      Failures:
      
        1) Mongoid::Contextual::Atomic#bit when performing a bitwise and does not error on non initialized fields
           Failure/Error: expect(smiths.reload.likes).to be_nil
             expected: nil
                  got: 0
           # ./spec/mongoid/contextual/atomic_spec.rb:107:in `block (4 levels) in <top (required)>'
      
        2) Mongoid::Contextual::Atomic#bit when performing a bitwise or does not error on non initialized fields
           Failure/Error: expect(smiths.reload.likes).to be_nil
             expected: nil
                  got: 13
           # ./spec/mongoid/contextual/atomic_spec.rb:122:in `block (4 levels) in <top (required)>'
      
        3) Mongoid::Contextual::Atomic#bit when chaining bitwise operations does not error on non initialized fields
           Failure/Error: expect(smiths.reload.likes).to be_nil
             expected: nil
                  got: 10
           # ./spec/mongoid/contextual/atomic_spec.rb:137:in `block (4 levels) in <top (required)>'
      
      Finished in 54.42 seconds
      8867 examples, 3 failures, 1 pending
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            fred fred
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: