replicate icon indicating copy to clipboard operation
replicate copied to clipboard

Broken under ruby 2.1?

Open tom-pang opened this issue 11 years ago • 2 comments

There's one super hard to figure out test failure under 2.1:

# Running tests:

[11/18] DumperTest#test_writing_to_io = 0.00 s
  1) Failure:
DumperTest#test_writing_to_io [/Users/tcrayford/Downloads/src/replicate/test/dumper_test.rb:53]:
<"\x04\b[\bI\"\x16Replicate::Object\x06:\x06ETi\x16{\bI\"\vnumber\x06;\x00Ti\x01{I\"\vstring\x06;\x00TI\"\nhello\x06;\x00TI\"\ttime\x06;\x00TIu:\tTime\r\x92\x83\x1C\x80Ic\xF09\a:\voffseti\x00:\tzoneI\"\bGMT\x06;\x00T"> expected but was
<"\x04\b[\bI\"\x16Replicate::Object\x06:\x06EFi\x16{\bI\"\vnumber\x06;\x00Ti\x01{I\"\vstring\x06;\x00TI\"\nhello\x06;\x00TI\"\ttime\x06;\x00TIu:\tTime\r\x92\x83\x1C\x80Ic\xF09\a:\voffseti\x00:\tzoneI\"\bGMT\x06;\x00T">.

Looks like our development dumping on our rails app doesn't work at all either.

I've scratched my head a bunch, and dug into the code some but I can't figure out what's causing the difference (the diff is that one has 06ET, the other 06EF)

tom-pang avatar Jan 28 '14 18:01 tom-pang

Strange indeed. Thanks for the report. Failing test is:

https://github.com/rtomayko/replicate/blob/9181dce22ef/test/dumper_test.rb#L47-L54

Smells like maybe a timestamp was added to the base marshal stuff but I haven't dug in too much to verify.

rtomayko avatar Jan 29 '14 16:01 rtomayko

@rtomayko : thanks for the response. Do you know if this might affect the bug that we're actually seeing when replicating from prod (via a script that does things over ssh), where the steps look like the following:

  1. replicate some AR objects
  2. replicate says it's dumping objects to the db
  3. objects never appear in databas (even though replicate says it's writing them)

tom-pang avatar Jan 29 '14 17:01 tom-pang