@@ -30,7 +30,7 @@ public class TestContinuousQueryEnlargement {
3030 /**
3131 * The name of the cluster for this test
3232 */
33- private static final String CLUSTER_NAME = "testcluster " ;
33+ private static final String DISTRIBUTION_GROUP = "testgroupenlagement " ;
3434
3535 /**
3636 * The delta for the asserts
@@ -44,7 +44,7 @@ public static void init() throws Exception {
4444
4545 @ Test (timeout =60_000 )
4646 public void testQueryRegister0 () {
47- final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (CLUSTER_NAME , "abc1" );
47+ final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (DISTRIBUTION_GROUP , "abc1" );
4848 final QueryEnlagement enlargement = registerer .getMaxEnlagementFactorForTable ();
4949 Assert .assertEquals (0 , enlargement .getMaxAbsoluteEnlargement (), DELTA );
5050 Assert .assertEquals (1 , enlargement .getMaxEnlargementFactor (), DELTA );
@@ -54,7 +54,7 @@ public void testQueryRegister0() {
5454
5555 @ Test (timeout =60_000 )
5656 public void testQueryRegister1 () throws ZookeeperException {
57- final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (CLUSTER_NAME , "abc2" );
57+ final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (DISTRIBUTION_GROUP , "abc2" );
5858 registerer .updateQueryOnTable (10 , 20 , 30 , 40 );
5959
6060 final QueryEnlagement enlargement = registerer .getMaxEnlagementFactorForTable ();
@@ -67,7 +67,7 @@ public void testQueryRegister1() throws ZookeeperException {
6767
6868 @ Test (timeout =60_000 )
6969 public void testQueryRegister2 () throws ZookeeperException {
70- final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (CLUSTER_NAME , "abc3" );
70+ final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (DISTRIBUTION_GROUP , "abc3" );
7171 registerer .updateQueryOnTable (30 , 40 , 50 , 60 );
7272
7373 final QueryEnlagement enlargement = registerer .getMaxEnlagementFactorForTable ();
@@ -79,7 +79,7 @@ public void testQueryRegister2() throws ZookeeperException {
7979
8080 @ Test (timeout =60_000 )
8181 public void testQueryUnRegister0 () throws ZookeeperException , InterruptedException {
82- final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (CLUSTER_NAME , "abc4" );
82+ final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer (DISTRIBUTION_GROUP , "abc4" );
8383 registerer .updateQueryOnTable (30 , 40 , 50 , 60 );
8484
8585 final QueryEnlagement enlargement = registerer .getMaxEnlagementFactorForTable ();
@@ -97,4 +97,9 @@ public void testQueryUnRegister0() throws ZookeeperException, InterruptedExcepti
9797 Assert .assertEquals (0 , enlargement .getMaxEnlargementLon (), DELTA );
9898 }
9999
100+ public static void main (String [] args ) throws ZookeeperException {
101+ final ContinuousQueryRegisterer registerer = new ContinuousQueryRegisterer ("mydgroup" , "table1" );
102+ registerer .updateQueryOnTable (30 , 40 , 50 , 60 );
103+ }
104+
100105}
0 commit comments