CVS User Account cvsuser
Tue Jul 11 08:43:08 PDT 2006
Log Message:
-----------
Add a test for a (not yet expected to work) test which tries joining
two sources together.

e.g. - set 1 has subscriptions:

  1 --> 2 --> 4

and set 2 has subscriptions

 1 --> 3 --> 4

There's no reason for trouble with nodes 1, 2, or 3; the "odd" case is
with node 4, which is drawing data from node 1 from two different places.

Modified Files:
--------------
    slony1-engine/tests/test1:
        README (r1.2 -> r1.3)
        generate_dml.sh (r1.6 -> r1.7)
        init_add_tables.ik (r1.5 -> r1.6)
        init_create_set.ik (r1.1 -> r1.2)
        init_subscribe_set.ik (r1.1 -> r1.2)
        settings.ik (r1.1 -> r1.2)

-------------- next part --------------
Index: settings.ik
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/settings.ik,v
retrieving revision 1.1
retrieving revision 1.2
diff -Ltests/test1/settings.ik -Ltests/test1/settings.ik -u -w -r1.1 -r1.2
--- tests/test1/settings.ik
+++ tests/test1/settings.ik
@@ -1,4 +1,4 @@
 NUMCLUSTERS=${NUMCLUSTERS:-"1"}
-NUMNODES=${NUMNODES:-"2"}
+NUMNODES=${NUMNODES:-"4"}
 ORIGINNODE=1
 WORKERS=${WORKERS:-"1"}
Index: init_add_tables.ik
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/init_add_tables.ik,v
retrieving revision 1.5
retrieving revision 1.6
diff -Ltests/test1/init_add_tables.ik -Ltests/test1/init_add_tables.ik -u -w -r1.5 -r1.6
--- tests/test1/init_add_tables.ik
+++ tests/test1/init_add_tables.ik
@@ -1,5 +1,6 @@
 set add table (id=1, set id=1, origin=1, fully qualified name = 'public.table1', comment='accounts table');
-set add table (id=2, set id=1, origin=1, fully qualified name = 'public.table2', key='table2_id_key');
+set add table (id=2, set id=2, origin=1, fully qualified name = 'public.table2', key='table2_id_key');
+
 table add key (node id = 1, fully qualified name = 'public.table3');
 set add table (id=3, set id=1, origin=1, fully qualified name = 'public.table3', key = SERIAL);
 
Index: init_subscribe_set.ik
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/init_subscribe_set.ik,v
retrieving revision 1.1
retrieving revision 1.2
diff -Ltests/test1/init_subscribe_set.ik -Ltests/test1/init_subscribe_set.ik -u -w -r1.1 -r1.2
--- tests/test1/init_subscribe_set.ik
+++ tests/test1/init_subscribe_set.ik
@@ -1 +1,8 @@
 subscribe set ( id = 1, provider = 1, receiver = 2, forward = no);
+wait for event (origin=ALL, confirmed=ALL, wait on 1, timeout=200);
+subscribe set ( id = 1, provider = 2, receiver = 4, forward = no);
+wait for event (origin=ALL, confirmed=ALL, wait on 1, timeout=200);
+subscribe set ( id = 2, provider = 1, receiver = 3, forward = no);
+wait for event (origin=ALL, confirmed=ALL, wait on 1, timeout=200);
+subscribe set ( id = 2, provider = 3, receiver = 4, forward = no);
+
Index: init_create_set.ik
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/init_create_set.ik,v
retrieving revision 1.1
retrieving revision 1.2
diff -Ltests/test1/init_create_set.ik -Ltests/test1/init_create_set.ik -u -w -r1.1 -r1.2
--- tests/test1/init_create_set.ik
+++ tests/test1/init_create_set.ik
@@ -1 +1,2 @@
 create set (id=1, origin=1, comment='All test1 tables');
+create set (id=2, origin=1, comment='All test2 tables');
Index: generate_dml.sh
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/generate_dml.sh,v
retrieving revision 1.6
retrieving revision 1.7
diff -Ltests/test1/generate_dml.sh -Ltests/test1/generate_dml.sh -u -w -r1.6 -r1.7
Index: README
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tests/test1/README,v
retrieving revision 1.2
retrieving revision 1.3
diff -Ltests/test1/README -Ltests/test1/README -u -w -r1.2 -r1.3
--- tests/test1/README
+++ tests/test1/README
@@ -1,20 +1,13 @@
 $Id$
 
-test1 is a basic test that replication generally functions.  
+test-odd-subscribes creates a "multi-flow" situation that does not, at
+this time, function.
 
-It doesn't try to do anything too terribly fancy: It creates three
-simple tables as one replication set, and replicates them from one
-database to another.
+It doesn't try to do anything too terribly fancy: It creates two
+replication sets, and replicates them in two ways:
 
-The three tables are of the three interesting types:
+set 1:
+1 --> 2 --> 4
 
-1.  table1 has a formal primary key
-
-2.  table2 lacks a formal primary key, but has a candidate primary key
-
-3.  table3 has no candidate primary key; Slony-I is expected to
-    generate one on its own.
-
-It actually tries replicating a fourth table, which has an invalid
-candidate primary key (columns not defined NOT NULL), which should
-cause it to be rejected.  That is done in a slonik TRY {} block.
+set 2:
+1 --> 3 --> 4



More information about the Slony1-commit mailing list