Skip to content

Commit

Permalink
fix broken unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Nov 14, 2007
1 parent 7a20a63 commit 33ee8a3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
29 changes: 16 additions & 13 deletions symmetric/src/main/resources/symmetric-services.xml
Expand Up @@ -390,13 +390,14 @@
<property name="findNodeSql">
<value>
select node_id, node_group_id, external_id, sync_enabled, sync_url, schema_version,
database_type, database_version from ${sync.table.prefix}_node where node_id = ?
database_type, database_version, symmetric_version from ${sync.table.prefix}_node where node_id = ?
</value>
</property>
<property name="findNodeByExternalIdSql">
<value>
select node_id, node_group_id, external_id, sync_enabled, sync_url, schema_version,
database_type, database_version from ${sync.table.prefix}_node where node_group_id=? and external_id = ?
database_type, database_version, symmetric_version from ${sync.table.prefix}_node
where node_group_id = ? and external_id = ?
</value>
</property>
<property name="findNodeSecuritySql">
Expand All @@ -408,32 +409,34 @@
<property name="findNodeIdentitySql">
<value>
select c.node_id, c.node_group_id, c.external_id, c.sync_enabled, c.sync_url,
c.schema_version, c.database_type, c.database_version, c.symmetric_version
from ${sync.table.prefix}_node
c inner join ${sync.table.prefix}_node_identity i on c.node_id = i.node_id
c.schema_version, c.database_type, c.database_version, c.symmetric_version from
${sync.table.prefix}_node c inner join ${sync.table.prefix}_node_identity i on
c.node_id = i.node_id
</value>
</property>
<property name="isNodeRegisteredSql">
<value>
select count(*) from ${sync.table.prefix}_node_security s inner join
${sync.table.prefix}_node n on n.node_id=s.node_id where n.node_group_id=? and n.external_id=? and
s.registration_time is not null and s.registration_enabled=0
${sync.table.prefix}_node n on n.node_id=s.node_id where n.node_group_id=? and
n.external_id=? and s.registration_time is not null and s.registration_enabled=0
</value>
</property>
<property name="findNodesWhoTargetMeSql">
<value>
select c.node_id, c.node_group_id, c.external_id, c.sync_enabled, c.sync_url,
c.schema_version, c.database_type, c.database_version from ${sync.table.prefix}_node
c inner join ${sync.table.prefix}_node_group_link d on c.node_group_id =
d.source_node_group_id where d.target_node_group_id = ? and d.data_event_action = ?
c.schema_version, c.database_type, c.database_version, c.symmetric_version from
${sync.table.prefix}_node c inner join ${sync.table.prefix}_node_group_link d on
c.node_group_id = d.source_node_group_id where d.target_node_group_id = ? and
d.data_event_action = ?
</value>
</property>
<property name="findNodesWhoITargetSql">
<value>
select c.node_id, c.node_group_id, c.external_id, c.sync_enabled, c.sync_url,
c.schema_version, c.database_type, c.database_version from ${sync.table.prefix}_node
c inner join ${sync.table.prefix}_node_group_link d on c.node_group_id =
d.target_node_group_id where d.source_node_group_id = ? and d.data_event_action = ?
c.schema_version, c.database_type, c.database_version, c.symmetric_version from
${sync.table.prefix}_node c inner join ${sync.table.prefix}_node_group_link d on
c.node_group_id = d.target_node_group_id where d.source_node_group_id = ? and
d.data_event_action = ?
</value>
</property>
</bean>
Expand Down
8 changes: 4 additions & 4 deletions symmetric/src/test/resources/test-continuous-setup.sql
Expand Up @@ -10,10 +10,10 @@ insert into sym_node_group_link values ('test-root-group','test-node-group', 'W'
insert into sym_node_group_link values ('symmetric','test-root-group', 'P');
insert into sym_node_group_link values ('STORE','CORP', 'P');
insert into sym_node_group_link values ('CORP','STORE', 'W');
insert into sym_node values ('00000', 'CORP', '00000', '1', 'http://centraloffice:8080/sync', 1, null,'Oracle', '9', current_timestamp);
insert into sym_node values ('00001', 'STORE', '00001', '1', 'http://localhost:8080/sync', 1, null, 'MySQL', '5', current_timestamp);
insert into sym_node values ('00002', 'STORE', '00002', '0', null, null, null, null, null, current_timestamp);
insert into sym_node values ('00003', 'STORE', '00003', '1', 'http://localhost:8080/', 0, null, 'MySql', '4', current_timestamp);
insert into sym_node values ('00000', 'CORP', '00000', '1', 'http://centraloffice:8080/sync', 1, '1.1','Oracle', '9', current_timestamp);
insert into sym_node values ('00001', 'STORE', '00001', '1', 'http://localhost:8080/sync', 1, '1.1', 'MySQL', '5', current_timestamp);
insert into sym_node values ('00002', 'STORE', '00002', '0', null, null, '1.1', null, null, current_timestamp);
insert into sym_node values ('00003', 'STORE', '00003', '1', 'http://localhost:8080/', 0, '1.1', 'MySql', '4', current_timestamp);
insert into sym_node_security values ('00001', 'secret', '0', {ts '2007-01-01 01:01:01'});
insert into sym_node_security values ('00002', 'supersecret', '1', null);
insert into sym_node_security values ('00003', 'notsecret', '0', {ts '2007-01-01 01:01:01'});
Expand Down
Expand Up @@ -5,7 +5,7 @@ insert into sym_node_group values ('test-node-group','a test config');
insert into sym_node_group_link values ('test-node-group','test-root-group', 'P');
insert into sym_node_group_link values ('test-root-group','test-node-group', 'W');

insert into sym_node values ('00000', 'test-root-group', '00000', '1', 'internal://symmetric', '?', null, 'MySQL', '5.0', current_timestamp);
insert into sym_node values ('00000', 'test-root-group', '00000', '1', 'internal://symmetric', '?', '1.1', 'MySQL', '5.0', current_timestamp);
insert into sym_node_identity values ('00000');

insert into sym_trigger
Expand Down

0 comments on commit 33ee8a3

Please sign in to comment.