"check max-journal-size limits" failed as not enough time allowed
Job #890395 failed for d9f357d0:
Test looped for 6 seconds when it took ~13 second.
n=`expr $n + 1`
echo_i "check max-journal-size limits ($n)"
ret=0
rm -f nsupdate.out1-$n
# add one record
$NSUPDATE << EOF >> nsupdate.out1-$n 2>&1
server 10.53.0.1 ${PORT}
zone maxjournal.test
update add z.maxjournal.test 300 IN A 10.20.30.40
send
EOF
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20; do
# repeatedly add and remove the same set of records to fill up
# the journal file without changing the zone content
$NSUPDATE << EOF >> nsupdate.out1-$n 2>&1
server 10.53.0.1 ${PORT}
zone maxjournal.test
update add a.maxjournal.test 300 IN A 1.2.3.4
update add b.maxjournal.test 300 IN A 1.2.3.4
update add c.maxjournal.test 300 IN A 1.2.3.4
update add d.maxjournal.test 300 IN A 1.2.3.4
send
update del a.maxjournal.test
update del b.maxjournal.test
update del c.maxjournal.test
update del d.maxjournal.test
send
EOF
done
# check that the journal is big enough to require truncation.
size=`$PERL -e 'use File::stat; my $sb = stat(@ARGV[0]); printf("%s\n", $sb->size);' ns1/maxjournal.db.jnl`
[ "$size" -gt 6000 ] || ret=1
sleep 1
$RNDCCMD 10.53.0.1 sync maxjournal.test
for i in 1 2 3 4 5 6
do
sleep 1
size=`$PERL -e 'use File::stat; my $sb = stat(@ARGV[0]); printf("%s\n", $sb->size);' ns1/maxjournal.db.jnl`
[ "$size" -lt 5000 ] && break
done
size=`$PERL -e 'use File::stat; my $sb = stat(@ARGV[0]); printf("%s\n", $sb->size);' ns1/maxjournal.db.jnl`
[ "$size" -lt 5000 ] || ret=1
[ $ret = 0 ] || { echo_i "failed"; status=1; }
18-May-2020 06:17:34.729 received control channel command 'sync maxjournal.test'
18-May-2020 06:17:34.733 zone_dump: zone maxjournal.test/IN: enter
18-May-2020 06:17:34.737 zone_gotwritehandle: zone maxjournal.test/IN: enter
18-May-2020 06:17:34.737 sync: dumping zone 'maxjournal.test/IN': success
18-May-2020 06:17:34.737 socket 0x7fb57ffdc778: socket_recv: event 0x7fb57ffde180 -> task 0x7fb58fc8b020
18-May-2020 06:17:34.737 sockmgr 0x7fb58fc79020 thread 11: watcher got message -3 for socket 155
18-May-2020 06:17:34.737 sockmgr 0x7fb58fc79020 thread 11: watcher got message -2 for socket -1
18-May-2020 06:17:34.737 socket 0x7fb57ffdc778: internal_recv: event 0x7fb57ffde180 -> task 0x7fb58fc8b020
18-May-2020 06:17:34.737 socket 0x7fb57ffdc778: destroying
18-May-2020 06:17:34.737 sockmgr 0x7fb58fc79020 thread 11: watcher got message -5 for socket 155
18-May-2020 06:17:34.737 sockmgr 0x7fb58fc79020 thread 11: watcher got message -2 for socket -1
18-May-2020 06:17:36.025 zone_timer: managed-keys-zone: enter
18-May-2020 06:17:36.025 zone_maintenance: managed-keys-zone: enter
18-May-2020 06:17:36.025 zone_dump: managed-keys-zone: enter
18-May-2020 06:17:36.025 zone_settimer: managed-keys-zone: enter
18-May-2020 06:17:45.393 dump_done: zone maxjournal.test/IN: enter
18-May-2020 06:17:45.393 zone_journal_compact: zone maxjournal.test/IN: target journal size 318
18-May-2020 06:17:45.393 journal file maxjournal.db.jnw does not exist, creating it
18-May-2020 06:17:47.353 zone maxjournal.test/IN: dns_journal_compact: success