Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
liunaijie committed Nov 28, 2024
1 parent 83abdc5 commit e22e077
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@

import com.hazelcast.instance.impl.HazelcastInstanceImpl;
import com.hazelcast.internal.serialization.Data;
import lombok.extern.slf4j.Slf4j;

import java.util.Collections;
import java.util.concurrent.TimeUnit;

import static org.awaitility.Awaitility.await;

@Slf4j
public class CoordinatorServiceTest {
@Test
public void testMasterNodeActive() {
Expand Down Expand Up @@ -98,24 +96,26 @@ public void testClearCoordinatorService() {
CoordinatorService coordinatorService = server1.getCoordinatorService();
Assertions.assertTrue(coordinatorService.isCoordinatorActive());

Long jobId = System.currentTimeMillis();
log.info("jobId: {}", jobId);
Long jobId =
coordinatorServiceTest
.getFlakeIdGenerator(Constant.SEATUNNEL_ID_GENERATOR_NAME)
.newId();
LogicalDag testLogicalDag =
TestUtils.createTestLogicalPlan(
"stream_fake_to_console.conf", "test_clear_coordinator_service", jobId);

JobImmutableInformation jobImmutableInformation =
new JobImmutableInformation(
jobId,
"test_clear_coordinator_service",
"Test",
coordinatorServiceTest.getSerializationService().toData(testLogicalDag),
testLogicalDag.getJobConfig(),
Collections.emptyList(),
Collections.emptyList());

Data data =
coordinatorServiceTest.getSerializationService().toData(jobImmutableInformation);
log.info("Start submit job.");

coordinatorService
.submitJob(jobId, data, jobImmutableInformation.isStartWithSavePoint())
.join();
Expand Down

0 comments on commit e22e077

Please sign in to comment.