1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.jumpmind.symmetric.test;
21
22 import org.apache.commons.logging.Log;
23 import org.apache.commons.logging.LogFactory;
24 import org.junit.Assert;
25 import org.junit.Test;
26 import org.springframework.jdbc.core.JdbcTemplate;
27
28 public class LoadFromClientIntegrationTest extends AbstractIntegrationTest {
29
30 static final Log logger = LogFactory.getLog(LoadFromClientIntegrationTest.class);
31
32 public LoadFromClientIntegrationTest() throws Exception {
33 }
34
35 public LoadFromClientIntegrationTest(String client, String root) throws Exception {
36 super(client, root);
37 }
38
39 @Test(timeout = 30000)
40 public void registerClientWithRoot() {
41 getRootEngine().openRegistration(TestConstants.TEST_CLIENT_NODE_GROUP, TestConstants.TEST_CLIENT_EXTERNAL_ID);
42 getClientEngine().start();
43 String result = getClientEngine().reloadNode("00000");
44 Assert.assertTrue(result, result.startsWith("Successfully opened initial load for node"));
45 getClientEngine().push();
46 JdbcTemplate jdbcTemplate = getClientDbDialect().getJdbcTemplate();
47 int initialLoadEnabled = jdbcTemplate.queryForInt("select initial_load_enabled from sym_node_security where node_id='00000'");
48 Assert.assertEquals(0, initialLoadEnabled);
49 }
50
51 }