summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2016-12-03 00:15:46 +0100
committerLinus Nordberg <linus@nordu.net>2016-12-03 00:15:46 +0100
commit66d06f2e7a7a0c851a0448a40ae20d8bee1c0ab3 (patch)
tree7f5267a34b2843e1d20fcaa462777c2ba93c17fe /test
parent4b5ddbae54d46bacc23661960b436ecd4f720026 (diff)
merge_sth: Don't try to go back in time.
Due to a recent change in get_nfetched(), merge_sth lacking the 'sth' file could go back to a tree size of zero. It's rejected by frontend nodes with a newer tree, but it's still a severe error to produce that piece of data. We add tools/initlog.py which creates an 'sth' file with tree size 0 and have tests invoke it after starting the erlang nodes, before starting the continous merge processes.
Diffstat (limited to 'test')
-rwxr-xr-xtest/scripts/continuous-merge-test.sh3
-rw-r--r--test/scripts/testutils.sh4
2 files changed, 6 insertions, 1 deletions
diff --git a/test/scripts/continuous-merge-test.sh b/test/scripts/continuous-merge-test.sh
index 3bb6de2..1e944b6 100755
--- a/test/scripts/continuous-merge-test.sh
+++ b/test/scripts/continuous-merge-test.sh
@@ -5,12 +5,13 @@ set -o errexit
top_srcdir=$(cd $(dirname $0)/../..; pwd)
-. ${top_srcdir}/test/test.shvars
+. ${top_srcdir}/test/scripts/testutils.sh
SCRIPTS=${top_srcdir}/test/scripts
tests_start() {
${SCRIPTS}/light-system-test-start.sh
+ init_log
${SCRIPTS}/continuous-merge-start.sh &
}
diff --git a/test/scripts/testutils.sh b/test/scripts/testutils.sh
index faa7026..ecefe2b 100644
--- a/test/scripts/testutils.sh
+++ b/test/scripts/testutils.sh
@@ -30,3 +30,7 @@ check_sth() {
do_merge() {
${top_srcdir}/tools/merge --config ${top_srcdir}/test/catlfish-test.cfg --timing --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg $@ || fail "Merge failed"
}
+
+init_log() {
+ ${top_srcdir}/tools/initlog.py --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg || fail "Log init failed"
+}