12 my $schema = DBICTest->init_schema();
14 $schema->storage_type( '::DBI::Replication' );
17 my $db_file1 = "t/var/DBIxClass.db";
18 my $db_file2 = "t/var/DBIxClass_slave1.db";
19 my $db_file3 = "t/var/DBIxClass_slave2.db";
20 my $dsn1 = $ENV{"DBICTEST_DSN"} || "dbi:SQLite:${db_file1}";
21 my $dsn2 = $ENV{"DBICTEST_DSN2"} || "dbi:SQLite:${db_file2}";
22 my $dsn3 = $ENV{"DBICTEST_DSN3"} || "dbi:SQLite:${db_file3}";
25 [ $dsn1, '', '', { AutoCommit => 1 } ],
26 [ $dsn2, '', '', { priority => 10 } ],
27 [ $dsn3, '', '', { priority => 10 } ]
31 $schema->populate('Artist', [
32 [ qw/artistid name/ ],
33 [ 4, 'Ozric Tentacles']
36 # try and read (should fail)
37 my $new_artist = $schema->resultset('Artist')->find(4);
39 warn "artist : $new_artist\n";
41 # try and read (should succede after faked synchronisation)
42 copy($db_file1, $db_file2);
46 ok(1,"These aren't the tests you're looking for");