# # # add_file "tests/t_sink_has_extra_epochs.at" # content [20612f68555918bb9c9edd0201066bc4ccc94475] # # patch "ChangeLog" # from [91ce3d6453a6b0ee608f3fb97f96c0867eea2451] # to [b38f98cd1afb0281469db3e4d33f4469899444b7] # # patch "tests/t_epoch.at" # from [1aa1362056b1a54ac22b09b5d7c83ab15ade35e7] # to [ca05184712f3e0dddae019c3fb9b7ee810dd1ebd] # # patch "testsuite.at" # from [1f60594483f6de8f4450f65b7958dc095d1030bf] # to [04f8381640b156fcfbeff4b422d12f45bcc6a5be] # ============================================================ --- tests/t_sink_has_extra_epochs.at 20612f68555918bb9c9edd0201066bc4ccc94475 +++ tests/t_sink_has_extra_epochs.at 20612f68555918bb9c9edd0201066bc4ccc94475 @@ -0,0 +1,34 @@ +AT_SETUP([one-way netsync where the sink has more epochs]) +MONOTONE_SETUP +NETSYNC_SETUP + +# If the sink has more epochs than the source (say, on branches that are +# included in the include glob, but only exist on the sink), then the epoch +# refiner on the source will say we have items to receive. But since we're in +# source-only mode, we won't actually be receiving any items. So our epoch +# refiner will forever say we have items to receive, and we don't want to hang +# forever waiting for them. + +# FIXME: This test will HANG on failure. (And then, of course, it will report +# "ok" if stopped with ^C, since the stuff to check that the push worked +# doesn't actually get run... :-/ ) + +ADD_FILE(foo, [foo +]) +COMMIT(testbranch) +AT_CHECK(MONOTONE db set_epoch testbranch 1234567890123456789009876543210987654321) +AT_CHECK(rm -r MT/) +AT_CHECK(MONOTONE2 setup -b otherbranch ., [], [ignore], [ignore]) +AT_DATA(bar, [bar +]) +AT_CHECK(MONOTONE2 add bar, [], [ignore], [ignore]) +AT_CHECK(MONOTONE2 commit -m blah-blah, [], [ignore], [ignore]) + +NETSYNC_SERVE_START(*branch) +NETSYNC_CLIENT_N_RUN(2, push, *branch, 0) +NETSYNC_SERVE_STOP + +AT_CHECK(MONOTONE ls branches, [], [stdout], [ignore]) +AT_CHECK(GREP `BASE_REVISION` stdout, [], [ignore], [ignore]) + +AT_CLEANUP ============================================================ --- ChangeLog 91ce3d6453a6b0ee608f3fb97f96c0867eea2451 +++ ChangeLog b38f98cd1afb0281469db3e4d33f4469899444b7 @@ -1,3 +1,11 @@ +2006-03-06 Timothy Brownawell + + * tests/t_push_with_upstream_epochs.at: Test that we don't hang on a + one-way transfer where the sink has extra epochs. + * testsuite.at: call it + * tests/t_epoch.at: When we're setting epochs by hand, also try one + with an invalid length. It should N(), not I(). + 2006-03-06 Graydon Hoare * lru_cache.hh (LRUCache::insert): Fix memory leak. ============================================================ --- tests/t_epoch.at 1aa1362056b1a54ac22b09b5d7c83ab15ade35e7 +++ tests/t_epoch.at ca05184712f3e0dddae019c3fb9b7ee810dd1ebd @@ -37,6 +37,7 @@ VER1=`BASE_REVISION` # change the epochs in the first db +AT_CHECK(MONOTONE db set_epoch testbranch 12345, [1], [ignore], [ignore]) AT_CHECK(MONOTONE db set_epoch testbranch aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, [], [ignore], [ignore]) AT_CHECK(MONOTONE db set_epoch otherbranch aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, [], [ignore], [ignore]) ============================================================ --- testsuite.at 1f60594483f6de8f4450f65b7958dc095d1030bf +++ testsuite.at 04f8381640b156fcfbeff4b422d12f45bcc6a5be @@ -789,3 +789,4 @@ m4_include(tests/t_merge_into_dir.at) m4_include(tests/t_restriction_excludes_parent.at) m4_include(tests/t_revert_move_to_renamed_dir.at) +m4_include(tests/t_sink_has_extra_epochs.at)