Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Broken under ruby 2.1? #32

Open
tcrayford opened this issue Jan 28, 2014 · 2 comments
Open

Broken under ruby 2.1? #32

tcrayford opened this issue Jan 28, 2014 · 2 comments

Comments

@tcrayford
Copy link

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)

@rtomayko
Copy link
Owner

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.

@tcrayford
Copy link
Author

@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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants