You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by mm...@apache.org on 2013/06/26 22:37:10 UTC

svn commit: r1497083 - /spamassassin/trunk/t/bayesdbm_flock.t

Author: mmartinec
Date: Wed Jun 26 20:37:10 2013
New Revision: 1497083

URL: http://svn.apache.org/r1497083
Log:
Bug 6949: BSD/OS failures: fix t/bayesdbm_flock.t: learner leaves timer running, which can abort sa-learn test runs longer than 10 seconds, resulting in a test failure

Modified:
    spamassassin/trunk/t/bayesdbm_flock.t

Modified: spamassassin/trunk/t/bayesdbm_flock.t
URL: http://svn.apache.org/viewvc/spamassassin/trunk/t/bayesdbm_flock.t?rev=1497083&r1=1497082&r2=1497083&view=diff
==============================================================================
--- spamassassin/trunk/t/bayesdbm_flock.t (original)
+++ spamassassin/trunk/t/bayesdbm_flock.t Wed Jun 26 20:37:10 2013
@@ -77,6 +77,7 @@ ok(getimpl->{store}->tie_db_writable());
 ok(!getimpl->{store}->seen_get($msgid));
 
 getimpl->{store}->untie_db();
+alarm(0);
 
 ok($sa->{bayes_scanner}->learn(1, $mail));
 
@@ -87,6 +88,7 @@ ok(getimpl->{store}->tie_db_writable());
 ok(getimpl->{store}->seen_get($msgid) eq 's');
 
 getimpl->{store}->untie_db();
+alarm(0);
 
 ok(getimpl->{store}->tie_db_writable());
 
@@ -113,6 +115,7 @@ foreach my $tok (@{$tokens}) {
 ok(!$tokerror);
 
 getimpl->{store}->untie_db();
+alarm(0);
 
 ok($sa->{bayes_scanner}->learn(0, $mail));
 
@@ -121,6 +124,7 @@ ok(getimpl->{store}->tie_db_writable());
 ok(getimpl->{store}->seen_get($msgid) eq 'h');
 
 getimpl->{store}->untie_db();
+alarm(0);
 
 ok(getimpl->{store}->tie_db_writable());
 
@@ -134,6 +138,7 @@ foreach my $tok (keys %{$toks}) {
 ok(!$tokerror);
 
 getimpl->{store}->untie_db();
+alarm(0);
 
 ok($sa->{bayes_scanner}->forget($mail));
 
@@ -142,6 +147,7 @@ ok(getimpl->{store}->tie_db_writable());
 ok(!getimpl->{store}->seen_get($msgid));
 
 getimpl->{store}->untie_db();
+alarm(0);
 
 undef $sa;
 
@@ -174,6 +180,8 @@ undef $sa;
 
 sa_t_init('bayes'); # this wipes out what is there and begins anew
 
+alarm(0);  # cancel timer - make sure that alarm is off
+
 # make sure we learn to a journal
 tstlocalrules ("
 bayes_learn_to_journal 0