From: janw Date: Thu, 26 Feb 2009 15:26:46 +0000 (+0000) Subject: Suite runs perfect. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d4f708ee38b48d15c4a1a2f34e703ae37239d529;p=gosa.git Suite runs perfect. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13470 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/tests/sqlite-check-concurrency.pl b/gosa-si/tests/sqlite-check-concurrency.pl index dfd258340..9f03c66c7 100755 --- a/gosa-si/tests/sqlite-check-concurrency.pl +++ b/gosa-si/tests/sqlite-check-concurrency.pl @@ -15,13 +15,14 @@ my %threads; my $count= 10; my $db_name= "./test.sqlite"; my $lock = $db_name.".si.lock"; -if(stat($lock)) { - unlink($lock); -} -if(stat($db_name)) { - unlink($db_name) -} +#if(stat($lock)) { +# unlink($lock); +#} +# +#if(stat($db_name)) { +# unlink($db_name) +#} for(my $i=0;$i<$count;$i++) { $threads{$i}= threads->create(\&check_database); @@ -68,7 +69,7 @@ sub unlock { sub run_test { my $self= shift; my $table_name= shift; - my $sql= "CREATE TABLE IF NOT EXISTS $table_name (id INTEGER, value VARCHAR(255))"; + my $sql= "CREATE TABLE IF NOT EXISTS $table_name (id INTEGER PRIMARY KEY, status VARCHAR(255) DEFAULT 'none')"; $self->lock(); eval { $self->{dbh}->do($sql); @@ -79,7 +80,7 @@ sub run_test { $self->unlock(); for(my $i=0;$i<100;$i++) { - $sql= "INSERT INTO $table_name VALUES ($i, 'test $i')"; + $sql= "INSERT INTO $table_name (id, status) VALUES (null, 'test $i')"; $self->lock(); eval { $self->{dbh}->do($sql);