-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Timestamp components are now decoded as unsigned integers as per the BSON specification. Previously components were erroneously decoded as signed integers.
-
Minor Change
Should be decoded as 32-bit unsigned integers:
1) BSON Corpus spec tests (timestamp.json): Timestamp type VALID CASE: Timestamp with high-order bit set on both seconds and increment converts bson to relaxed extended json Failure/Error: JSON.parse(decoded_canonical_bson.to_json).should == (test.relaxed_extjson_doc || test.canonical_extjson_doc) expected: {"a"=>{"$timestamp"=>{"i"=>4294967295, "t"=>4294967295}}} got: {"a"=>{"$timestamp"=>{"i"=>-1, "t"=>-1}}} (using ==) Diff: @@ -1,2 +1,2 @@ -"a" => {"$timestamp"=>{"i"=>4294967295, "t"=>4294967295}}, +"a" => {"$timestamp"=>{"i"=>-1, "t"=>-1}}, # ./spec/spec_tests/corpus_spec.rb:39:in `block (6 levels) in <top (required)>' 6/6 |======================================== 100 ========================================>| Time: 00:00:00 Finished in 0.04077 seconds (files took 0.26375 seconds to load) 6 examples, 1 failure Failed examples: rspec './spec/spec_tests/corpus_spec.rb[1:14:3:2]' # BSON Corpus spec tests (timestamp.json): Timestamp type VALID CASE: Timestamp with high-order bit set on both seconds and increment converts bson to relaxed extended json
- is related to
-
RUBY-1168 Correct BSON corpus Decimal128 test failures
- Closed