Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: kinosearch: commits
r3758 - trunk/perl/t
 

Index | Next | Previous | View Flat


marvin at rectangular

Aug 24, 2008, 9:40 PM


Views: 495
Permalink
r3758 - trunk/perl/t

Author: creamyg
Date: 2008-08-24 21:40:46 -0700 (Sun, 24 Aug 2008)
New Revision: 3758

Modified:
trunk/perl/t/020-subclassing_obj.t
trunk/perl/t/026-serialization.t
trunk/perl/t/109-read_locking.t
Log:
Skip leaky tests under Valgrind.


Modified: trunk/perl/t/020-subclassing_obj.t
===================================================================
--- trunk/perl/t/020-subclassing_obj.t 2008-08-25 00:34:08 UTC (rev 3757)
+++ trunk/perl/t/020-subclassing_obj.t 2008-08-25 04:40:46 UTC (rev 3758)
@@ -71,7 +71,11 @@
my $dupe = thaw($frozen);
is( ref($dupe), ref($bar), "override serialize/deserialize" );

-my $bad = BadSerialize->new;
-eval { my $froze = freeze($bad); };
-like( $@, qr/empty/i,
- "Don't allow subclasses to perform invalid serialization" );
+SKIP: {
+ skip( "Invalid serialization causes leaks", 1 ) if $ENV{KINO_VALGRIND};
+ my $bad = BadSerialize->new;
+ eval { my $froze = freeze($bad); };
+ like( $@, qr/empty/i,
+ "Don't allow subclasses to perform invalid serialization" );
+}
+

Modified: trunk/perl/t/026-serialization.t
===================================================================
--- trunk/perl/t/026-serialization.t 2008-08-25 00:34:08 UTC (rev 3757)
+++ trunk/perl/t/026-serialization.t 2008-08-25 04:40:46 UTC (rev 3758)
@@ -103,11 +103,14 @@
my $bb = KinoSearch::Util::ByteBuf->new("foo");
run_test_cycle( $bb, sub { shift->to_perl } );

-my $bad_obj = BadObj->new("Royale With Cheese");
-eval {
- run_test_cycle( $bad_obj, sub { ref( $_[0] ) } );
-};
-like( $@, qr/BadObj/i, "throw error with bad deserialize" );
+SKIP: {
+ skip( "Invalid deserialization causes leaks", 1 ) if $ENV{KINO_VALGRIND};
+ my $bad_obj = BadObj->new("Royale With Cheese");
+ eval {
+ run_test_cycle( $bad_obj, sub { ref( $_[0] ) } );
+ };
+ like( $@, qr/BadObj/i, "throw error with bad deserialize" );
+}

sub run_test_cycle {
my ( $orig, $transform ) = @_;

Modified: trunk/perl/t/109-read_locking.t
===================================================================
--- trunk/perl/t/109-read_locking.t 2008-08-25 00:34:08 UTC (rev 3757)
+++ trunk/perl/t/109-read_locking.t 2008-08-25 04:40:46 UTC (rev 3758)
@@ -55,13 +55,16 @@
folder => $invindex->get_folder,
);
my $reader;
+SKIP: {
eval {
+ skip( "IndexReader opening failure leaks", 1 ) if $ENV{KINO_VALGRIND};
$reader = KinoSearch::Index::IndexReader->open(
invindex => $invindex,
lock_factory => $lock_factory,
);
};
like( $@, qr/commit/, "IndexReader dies if it can't get commit lock" );
+}
$folder->delete_file('commit.lock');

Test_race_condition_1: {


_______________________________________________
kinosearch-commits mailing list
kinosearch-commits [at] rectangular
http://www.rectangular.com/mailman/listinfo/kinosearch-commits

Subject User Time
r3758 - trunk/perl/t marvin at rectangular Aug 24, 2008, 9:40 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.