You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2020/07/05 06:01:52 UTC
[shardingsphere-elasticjob-lite] branch master updated: Fixes #948
(#949)
This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob-lite.git
The following commit(s) were added to refs/heads/master by this push:
new fa232c1 Fixes #948 (#949)
fa232c1 is described below
commit fa232c1ddf8dff26bb307907859608f401101469
Author: Liang Zhang <te...@163.com>
AuthorDate: Sun Jul 5 14:01:45 2020 +0800
Fixes #948 (#949)
* Decouple DisabledJobIntegrateTest and SimpleJob
* Use job instance for judge whether job is completed
* Remove useless StreamingDataflowElasticJobForExecuteFailureTest
* Remove useless StreamingDataflowElasticJobForExecuteThrowsExceptionTest
* Rename test cases name
* Remove useless StreamingDataflowJobForMultipleThreadsTest
* For code format
* Remove duplicate regCenter.init()
---
.../lite/integrate/BaseIntegrateTest.java | 6 ++-
.../lite/integrate/DisabledJobIntegrateTest.java | 12 +----
.../OneOffDisabledJobIntegrateTest.java | 2 +-
.../ScheduleDisabledJobIntegrateTest.java | 2 +-
...asticJobTest.java => BatchDataflowJobTest.java} | 18 ++-----
...cJobTest.java => StreamingDataflowJobTest.java} | 18 ++-----
.../enable/oneoff/simple/SimpleElasticJobTest.java | 10 +---
...asticJobTest.java => BatchDataflowJobTest.java} | 18 ++-----
...ingDataflowElasticJobForExecuteFailureTest.java | 56 ---------------------
...lowElasticJobForExecuteThrowsExceptionTest.java | 56 ---------------------
...ngDataflowElasticJobForMultipleThreadsTest.java | 56 ---------------------
...reamingDataflowElasticJobForNotMonitorTest.java | 57 ----------------------
...cJobTest.java => StreamingDataflowJobTest.java} | 18 ++-----
.../schedule/simple/SimpleElasticJobTest.java | 10 +---
...taflowElasticJob.java => BatchDataflowJob.java} | 15 ++----
...reamingDataflowElasticJobForExecuteFailure.java | 51 -------------------
...ataflowElasticJobForExecuteThrowsException.java | 53 --------------------
...owElasticJob.java => StreamingDataflowJob.java} | 15 ++----
.../integrate/fixture/simple/FooSimpleJob.java | 11 +----
...okeeperRegistryCenterQueryWithoutCacheTest.java | 2 +-
20 files changed, 42 insertions(+), 444 deletions(-)
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java
index 7a4d3fe..58ff84a 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java
@@ -55,6 +55,9 @@ public abstract class BaseIntegrateTest {
@Getter(value = AccessLevel.PROTECTED)
private static CoordinatorRegistryCenter regCenter = new ZookeeperRegistryCenter(zkConfig);
+ @Getter(value = AccessLevel.PROTECTED)
+ private final ElasticJob elasticJob;
+
@Getter(AccessLevel.PROTECTED)
private final JobConfiguration jobConfiguration;
@@ -66,12 +69,14 @@ public abstract class BaseIntegrateTest {
private final String jobName = System.nanoTime() + "_test_job";
protected BaseIntegrateTest(final TestType type, final ElasticJob elasticJob) {
+ this.elasticJob = elasticJob;
jobConfiguration = getJobConfiguration(jobName);
jobBootstrap = createJobBootstrap(type, elasticJob);
leaderService = new LeaderService(regCenter, jobName);
}
protected BaseIntegrateTest(final TestType type, final String elasticJobType) {
+ elasticJob = null;
jobConfiguration = getJobConfiguration(jobName);
jobBootstrap = createJobBootstrap(type, elasticJobType);
leaderService = new LeaderService(regCenter, jobName);
@@ -110,7 +115,6 @@ public abstract class BaseIntegrateTest {
@Before
public void setUp() {
- regCenter.init();
if (jobBootstrap instanceof ScheduleJobBootstrap) {
((ScheduleJobBootstrap) jobBootstrap).schedule();
} else {
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/DisabledJobIntegrateTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/DisabledJobIntegrateTest.java
index 88b9aeb..0d1f695 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/DisabledJobIntegrateTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/DisabledJobIntegrateTest.java
@@ -17,22 +17,14 @@
package org.apache.shardingsphere.elasticjob.lite.integrate;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.simple.FooSimpleJob;
+import org.apache.shardingsphere.elasticjob.lite.executor.fixture.job.DetailedFooJob;
import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
public abstract class DisabledJobIntegrateTest extends BaseIntegrateTest {
public DisabledJobIntegrateTest(final TestType type) {
- super(type, new FooSimpleJob());
- }
-
- @Before
- @After
- public void reset() {
- FooSimpleJob.reset();
+ super(type, new DetailedFooJob());
}
@Test
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/oneoff/OneOffDisabledJobIntegrateTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/OneOffDisabledJobIntegrateTest.java
similarity index 98%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/oneoff/OneOffDisabledJobIntegrateTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/OneOffDisabledJobIntegrateTest.java
index 78f64df..646ce63 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/oneoff/OneOffDisabledJobIntegrateTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/OneOffDisabledJobIntegrateTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.disable.oneoff;
+package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.disable;
import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
import org.apache.shardingsphere.elasticjob.lite.integrate.DisabledJobIntegrateTest;
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/schedule/ScheduleDisabledJobIntegrateTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/ScheduleDisabledJobIntegrateTest.java
similarity index 98%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/schedule/ScheduleDisabledJobIntegrateTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/ScheduleDisabledJobIntegrateTest.java
index 8f3c3b4..91f3df6 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/schedule/ScheduleDisabledJobIntegrateTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/disable/ScheduleDisabledJobIntegrateTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.disable.schedule;
+package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.disable;
import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
import org.apache.shardingsphere.elasticjob.lite.integrate.DisabledJobIntegrateTest;
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/OneOffDataflowElasticJobTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/BatchDataflowJobTest.java
similarity index 81%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/OneOffDataflowElasticJobTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/BatchDataflowJobTest.java
index 4501243..2b83865 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/OneOffDataflowElasticJobTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/BatchDataflowJobTest.java
@@ -20,24 +20,16 @@ package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.one
import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.OneOffDataflowElasticJob;
+import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.BatchDataflowJob;
import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
-public final class OneOffDataflowElasticJobTest extends EnabledJobIntegrateTest {
+public final class BatchDataflowJobTest extends EnabledJobIntegrateTest {
- public OneOffDataflowElasticJobTest() {
- super(TestType.ONE_OFF, new OneOffDataflowElasticJob());
- }
-
- @Before
- @After
- public void reset() {
- OneOffDataflowElasticJob.reset();
+ public BatchDataflowJobTest() {
+ super(TestType.ONE_OFF, new BatchDataflowJob());
}
@Override
@@ -48,7 +40,7 @@ public final class OneOffDataflowElasticJobTest extends EnabledJobIntegrateTest
@Test
public void assertJobInit() {
- while (!OneOffDataflowElasticJob.isCompleted()) {
+ while (!((BatchDataflowJob) getElasticJob()).isCompleted()) {
BlockUtils.waitingShortTime();
}
assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/StreamingDataflowElasticJobTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/StreamingDataflowJobTest.java
similarity index 80%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/StreamingDataflowElasticJobTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/StreamingDataflowJobTest.java
index 4e35f3e..64bc56f 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/StreamingDataflowElasticJobTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/dataflow/StreamingDataflowJobTest.java
@@ -20,24 +20,16 @@ package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.one
import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowElasticJob;
+import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowJob;
import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
-public final class StreamingDataflowElasticJobTest extends EnabledJobIntegrateTest {
+public final class StreamingDataflowJobTest extends EnabledJobIntegrateTest {
- public StreamingDataflowElasticJobTest() {
- super(TestType.ONE_OFF, new StreamingDataflowElasticJob());
- }
-
- @Before
- @After
- public void reset() {
- StreamingDataflowElasticJob.reset();
+ public StreamingDataflowJobTest() {
+ super(TestType.ONE_OFF, new StreamingDataflowJob());
}
@Override
@@ -48,7 +40,7 @@ public final class StreamingDataflowElasticJobTest extends EnabledJobIntegrateTe
@Test
public void assertJobInit() {
- while (!StreamingDataflowElasticJob.isCompleted()) {
+ while (!((StreamingDataflowJob) getElasticJob()).isCompleted()) {
BlockUtils.waitingShortTime();
}
assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/simple/SimpleElasticJobTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/simple/SimpleElasticJobTest.java
index ee18942..cbf16bc 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/simple/SimpleElasticJobTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/oneoff/simple/SimpleElasticJobTest.java
@@ -21,8 +21,6 @@ import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration
import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.simple.FooSimpleJob;
import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
@@ -33,12 +31,6 @@ public final class SimpleElasticJobTest extends EnabledJobIntegrateTest {
super(TestType.ONE_OFF, new FooSimpleJob());
}
- @Before
- @After
- public void reset() {
- FooSimpleJob.reset();
- }
-
@Override
protected JobConfiguration getJobConfiguration(final String jobName) {
return JobConfiguration.newBuilder(jobName, 3).shardingItemParameters("0=A,1=B,2=C").overwrite(true).build();
@@ -46,7 +38,7 @@ public final class SimpleElasticJobTest extends EnabledJobIntegrateTest {
@Test
public void assertJobInit() {
- while (!FooSimpleJob.isCompleted()) {
+ while (!((FooSimpleJob) getElasticJob()).isCompleted()) {
BlockUtils.waitingShortTime();
}
assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/OneOffDataflowElasticJobTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/BatchDataflowJobTest.java
similarity index 81%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/OneOffDataflowElasticJobTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/BatchDataflowJobTest.java
index 616c57f..005c4e2 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/OneOffDataflowElasticJobTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/BatchDataflowJobTest.java
@@ -20,24 +20,16 @@ package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.sch
import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.OneOffDataflowElasticJob;
+import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.BatchDataflowJob;
import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
-public final class OneOffDataflowElasticJobTest extends EnabledJobIntegrateTest {
+public final class BatchDataflowJobTest extends EnabledJobIntegrateTest {
- public OneOffDataflowElasticJobTest() {
- super(TestType.SCHEDULE, new OneOffDataflowElasticJob());
- }
-
- @Before
- @After
- public void reset() {
- OneOffDataflowElasticJob.reset();
+ public BatchDataflowJobTest() {
+ super(TestType.SCHEDULE, new BatchDataflowJob());
}
@Override
@@ -48,7 +40,7 @@ public final class OneOffDataflowElasticJobTest extends EnabledJobIntegrateTest
@Test
public void assertJobInit() {
- while (!OneOffDataflowElasticJob.isCompleted()) {
+ while (!((BatchDataflowJob) getElasticJob()).isCompleted()) {
BlockUtils.waitingShortTime();
}
assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForExecuteFailureTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForExecuteFailureTest.java
deleted file mode 100644
index b4cf3cf..0000000
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForExecuteFailureTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.schedule.dataflow;
-
-import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
-import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
-import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowElasticJobForExecuteFailure;
-import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-public final class StreamingDataflowElasticJobForExecuteFailureTest extends EnabledJobIntegrateTest {
-
- public StreamingDataflowElasticJobForExecuteFailureTest() {
- super(TestType.SCHEDULE, new StreamingDataflowElasticJobForExecuteFailure());
- }
-
- @Before
- @After
- public void reset() {
- StreamingDataflowElasticJobForExecuteFailure.reset();
- }
-
- @Override
- protected JobConfiguration getJobConfiguration(final String jobName) {
- return JobConfiguration.newBuilder(jobName, 3).cron("0/1 * * * * ?")
- .shardingItemParameters("0=A,1=B,2=C").overwrite(true).setProperty(DataflowJobExecutor.STREAM_PROCESS_KEY, Boolean.TRUE.toString()).build();
- }
-
- @Test
- public void assertJobInit() {
- while (!StreamingDataflowElasticJobForExecuteFailure.isCompleted()) {
- BlockUtils.waitingShortTime();
- }
- assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
- }
-}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForExecuteThrowsExceptionTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForExecuteThrowsExceptionTest.java
deleted file mode 100644
index 0596efe..0000000
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForExecuteThrowsExceptionTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.schedule.dataflow;
-
-import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
-import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
-import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowElasticJobForExecuteThrowsException;
-import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-public final class StreamingDataflowElasticJobForExecuteThrowsExceptionTest extends EnabledJobIntegrateTest {
-
- public StreamingDataflowElasticJobForExecuteThrowsExceptionTest() {
- super(TestType.SCHEDULE, new StreamingDataflowElasticJobForExecuteThrowsException());
- }
-
- @Before
- @After
- public void reset() {
- StreamingDataflowElasticJobForExecuteThrowsException.reset();
- }
-
- @Override
- protected JobConfiguration getJobConfiguration(final String jobName) {
- return JobConfiguration.newBuilder(jobName, 3).cron("0/1 * * * * ?")
- .shardingItemParameters("0=A,1=B,2=C").jobErrorHandlerType("IGNORE").overwrite(true).setProperty(DataflowJobExecutor.STREAM_PROCESS_KEY, Boolean.TRUE.toString()).build();
- }
-
- @Test
- public void assertJobInit() {
- while (!StreamingDataflowElasticJobForExecuteThrowsException.isCompleted()) {
- BlockUtils.waitingShortTime();
- }
- assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
- }
-}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForMultipleThreadsTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForMultipleThreadsTest.java
deleted file mode 100644
index 5863257..0000000
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForMultipleThreadsTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.schedule.dataflow;
-
-import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
-import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
-import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowElasticJob;
-import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-public final class StreamingDataflowElasticJobForMultipleThreadsTest extends EnabledJobIntegrateTest {
-
- public StreamingDataflowElasticJobForMultipleThreadsTest() {
- super(TestType.SCHEDULE, new StreamingDataflowElasticJob());
- }
-
- @Before
- @After
- public void reset() {
- StreamingDataflowElasticJob.reset();
- }
-
- @Override
- protected JobConfiguration getJobConfiguration(final String jobName) {
- return JobConfiguration.newBuilder(jobName, 3).cron("0/1 * * * * ?")
- .shardingItemParameters("0=A,1=B,2=C").overwrite(true).setProperty(DataflowJobExecutor.STREAM_PROCESS_KEY, Boolean.TRUE.toString()).build();
- }
-
- @Test
- public void assertJobInit() {
- while (!StreamingDataflowElasticJob.isCompleted()) {
- BlockUtils.waitingShortTime();
- }
- assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
- }
-}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForNotMonitorTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForNotMonitorTest.java
deleted file mode 100644
index 72c137e..0000000
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobForNotMonitorTest.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.schedule.dataflow;
-
-import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
-import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
-import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowElasticJob;
-import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-
-public final class StreamingDataflowElasticJobForNotMonitorTest extends EnabledJobIntegrateTest {
-
- public StreamingDataflowElasticJobForNotMonitorTest() {
- super(TestType.SCHEDULE, new StreamingDataflowElasticJob());
- }
-
- @Before
- @After
- public void reset() {
- StreamingDataflowElasticJob.reset();
- }
-
- @Override
- protected JobConfiguration getJobConfiguration(final String jobName) {
- return JobConfiguration.newBuilder(jobName, 3).cron("0/1 * * * * ?")
- .shardingItemParameters("0=A,1=B,2=C").monitorExecution(false).overwrite(true)
- .setProperty(DataflowJobExecutor.STREAM_PROCESS_KEY, Boolean.TRUE.toString()).build();
- }
-
- @Test
- public void assertJobInit() {
- while (!StreamingDataflowElasticJob.isCompleted()) {
- BlockUtils.waitingShortTime();
- }
- assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
- }
-}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowJobTest.java
similarity index 80%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobTest.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowJobTest.java
index 6f1cec9..75e1feb 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowElasticJobTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/dataflow/StreamingDataflowJobTest.java
@@ -20,24 +20,16 @@ package org.apache.shardingsphere.elasticjob.lite.integrate.assertion.enable.sch
import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration;
import org.apache.shardingsphere.elasticjob.lite.executor.type.impl.DataflowJobExecutor;
import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
-import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowElasticJob;
+import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow.StreamingDataflowJob;
import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
-public final class StreamingDataflowElasticJobTest extends EnabledJobIntegrateTest {
+public final class StreamingDataflowJobTest extends EnabledJobIntegrateTest {
- public StreamingDataflowElasticJobTest() {
- super(TestType.SCHEDULE, new StreamingDataflowElasticJob());
- }
-
- @Before
- @After
- public void reset() {
- StreamingDataflowElasticJob.reset();
+ public StreamingDataflowJobTest() {
+ super(TestType.SCHEDULE, new StreamingDataflowJob());
}
@Override
@@ -48,7 +40,7 @@ public final class StreamingDataflowElasticJobTest extends EnabledJobIntegrateTe
@Test
public void assertJobInit() {
- while (!StreamingDataflowElasticJob.isCompleted()) {
+ while (!((StreamingDataflowJob) getElasticJob()).isCompleted()) {
BlockUtils.waitingShortTime();
}
assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/simple/SimpleElasticJobTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/simple/SimpleElasticJobTest.java
index bb83486..6596a6f 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/simple/SimpleElasticJobTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/assertion/enable/schedule/simple/SimpleElasticJobTest.java
@@ -21,8 +21,6 @@ import org.apache.shardingsphere.elasticjob.lite.api.job.config.JobConfiguration
import org.apache.shardingsphere.elasticjob.lite.integrate.EnabledJobIntegrateTest;
import org.apache.shardingsphere.elasticjob.lite.integrate.fixture.simple.FooSimpleJob;
import org.apache.shardingsphere.elasticjob.lite.util.concurrent.BlockUtils;
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
@@ -33,12 +31,6 @@ public final class SimpleElasticJobTest extends EnabledJobIntegrateTest {
super(TestType.SCHEDULE, new FooSimpleJob());
}
- @Before
- @After
- public void reset() {
- FooSimpleJob.reset();
- }
-
@Override
protected JobConfiguration getJobConfiguration(final String jobName) {
return JobConfiguration.newBuilder(jobName, 3).cron("0/1 * * * * ?").shardingItemParameters("0=A,1=B,2=C").overwrite(true).build();
@@ -46,7 +38,7 @@ public final class SimpleElasticJobTest extends EnabledJobIntegrateTest {
@Test
public void assertJobInit() {
- while (!FooSimpleJob.isCompleted()) {
+ while (!((FooSimpleJob) getElasticJob()).isCompleted()) {
BlockUtils.waitingShortTime();
}
assertTrue(getRegCenter().isExisted("/" + getJobName() + "/sharding"));
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/OneOffDataflowElasticJob.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/BatchDataflowJob.java
similarity index 76%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/OneOffDataflowElasticJob.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/BatchDataflowJob.java
index 031c2e1..7627a5a 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/OneOffDataflowElasticJob.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/BatchDataflowJob.java
@@ -25,11 +25,11 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
-public final class OneOffDataflowElasticJob implements DataflowJob<String> {
+public final class BatchDataflowJob implements DataflowJob<String> {
- private static volatile Set<String> processedData = new CopyOnWriteArraySet<>();
+ private final Set<String> processedData = new CopyOnWriteArraySet<>();
- private static volatile List<String> result = Arrays.asList("data0", "data1", "data2", "data3", "data4", "data5", "data6", "data7", "data8", "data9");
+ private final List<String> result = Arrays.asList("data0", "data1", "data2", "data3", "data4", "data5", "data6", "data7", "data8", "data9");
@Override
public List<String> fetchData(final ShardingContext shardingContext) {
@@ -46,14 +46,7 @@ public final class OneOffDataflowElasticJob implements DataflowJob<String> {
*
* @return true if is completed
*/
- public static boolean isCompleted() {
+ public boolean isCompleted() {
return result.size() == processedData.size();
}
-
- /**
- * Reset the processed data set.
- */
- public static void reset() {
- processedData.clear();
- }
}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJobForExecuteFailure.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJobForExecuteFailure.java
deleted file mode 100644
index d983957..0000000
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJobForExecuteFailure.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow;
-
-import lombok.Getter;
-import org.apache.shardingsphere.elasticjob.lite.api.job.ShardingContext;
-import org.apache.shardingsphere.elasticjob.lite.api.job.type.DataflowJob;
-
-import java.util.Collections;
-import java.util.List;
-
-public class StreamingDataflowElasticJobForExecuteFailure implements DataflowJob<String> {
-
- @Getter
- private static volatile boolean completed;
-
- @Override
- public List<String> fetchData(final ShardingContext shardingContext) {
- if (completed) {
- return null;
- }
- return Collections.singletonList("data");
- }
-
- @Override
- public void processData(final ShardingContext shardingContext, final List<String> data) {
- completed = true;
- }
-
- /**
- * Set completed to false.
- */
- public static void reset() {
- completed = false;
- }
-}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJobForExecuteThrowsException.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJobForExecuteThrowsException.java
deleted file mode 100644
index 388f078..0000000
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJobForExecuteThrowsException.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.integrate.fixture.dataflow;
-
-import lombok.Getter;
-import org.apache.shardingsphere.elasticjob.lite.api.job.ShardingContext;
-import org.apache.shardingsphere.elasticjob.lite.api.job.type.DataflowJob;
-import org.apache.shardingsphere.elasticjob.lite.exception.JobSystemException;
-
-import java.util.Collections;
-import java.util.List;
-
-public class StreamingDataflowElasticJobForExecuteThrowsException implements DataflowJob<String> {
-
- @Getter
- private static volatile boolean completed;
-
- @Override
- public List<String> fetchData(final ShardingContext shardingContext) {
- if (completed) {
- return null;
- }
- return Collections.singletonList("data");
- }
-
- @Override
- public void processData(final ShardingContext shardingContext, final List<String> data) {
- completed = true;
- throw new JobSystemException("I want an error.");
- }
-
- /**
- * Set completed to false.
- */
- public static void reset() {
- completed = false;
- }
-}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJob.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowJob.java
similarity index 76%
rename from elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJob.java
rename to elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowJob.java
index 4a48959..b3ea928 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowElasticJob.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/dataflow/StreamingDataflowJob.java
@@ -25,11 +25,11 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArraySet;
-public final class StreamingDataflowElasticJob implements DataflowJob<String> {
+public final class StreamingDataflowJob implements DataflowJob<String> {
- private static volatile Set<String> processedData = new CopyOnWriteArraySet<>();
+ private final Set<String> processedData = new CopyOnWriteArraySet<>();
- private static volatile List<String> result = Arrays.asList("data0", "data1", "data2", "data3", "data4", "data5", "data6", "data7", "data8", "data9");
+ private final List<String> result = Arrays.asList("data0", "data1", "data2", "data3", "data4", "data5", "data6", "data7", "data8", "data9");
@Override
public List<String> fetchData(final ShardingContext shardingContext) {
@@ -46,14 +46,7 @@ public final class StreamingDataflowElasticJob implements DataflowJob<String> {
*
* @return true if is completed
*/
- public static boolean isCompleted() {
+ public boolean isCompleted() {
return result.size() == processedData.size();
}
-
- /**
- * Reset the processed data set.
- */
- public static void reset() {
- processedData.clear();
- }
}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/simple/FooSimpleJob.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/simple/FooSimpleJob.java
index e8264a2..1141611 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/simple/FooSimpleJob.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/fixture/simple/FooSimpleJob.java
@@ -21,20 +21,13 @@ import lombok.Getter;
import org.apache.shardingsphere.elasticjob.lite.api.job.ShardingContext;
import org.apache.shardingsphere.elasticjob.lite.api.job.type.SimpleJob;
+@Getter
public final class FooSimpleJob implements SimpleJob {
- @Getter
- private static volatile boolean completed;
+ private volatile boolean completed;
@Override
public void execute(final ShardingContext shardingContext) {
completed = true;
}
-
- /**
- * Set completed to false.
- */
- public static void reset() {
- completed = false;
- }
}
diff --git a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java
index bc032d2..c2beeef 100644
--- a/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java
+++ b/elastic-job-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperRegistryCenterQueryWithoutCacheTest.java
@@ -90,7 +90,7 @@ public final class ZookeeperRegistryCenterQueryWithoutCacheTest {
long updatedRegCenterTime = zkRegCenter.getRegistryCenterTime("/_systemTime/current");
assertTrue(regCenterTime < updatedRegCenterTime);
}
-
+
@Test
public void assertGetWithoutNode() {
assertNull(zkRegCenter.get("/notExisted"));