Skip to content

Commit

Permalink
add e2e test case and code style
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-a-ge committed Jul 29, 2023
1 parent 68f9783 commit 7542853
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/en/connector-v2/sink/Doris.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Version Supported

## Sink Options

| Name | Type | Required | Default | Description |
| Name | Type | Required | Default | Description |
|---------------------|--------|----------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| fenodes | String | Yes | - | `Doris` cluster fenodes address, the format is `"fe_ip:fe_http_port, ..."` |
| username | String | Yes | - | `Doris` user username |
Expand All @@ -49,7 +49,7 @@ Version Supported

## Data Type Mapping

| Doris Data type | SeaTunnel Data type |
| Doris Data type | SeaTunnel Data type |
|-----------------|-----------------------------------------|
| BOOLEAN | BOOLEAN |
| TINYINT | TINYINT |
Expand Down
2 changes: 1 addition & 1 deletion docs/en/connector-v2/source/Hudi.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In order to use this connector, You must ensure your spark/flink cluster already

## Source Options

| Name | Type | Required | Default | Description |
| Name | Type | Required | Default | Description |
|-------------------------|--------|------------------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| table.path | String | Yes | - | The hdfs root path of hudi table,such as 'hdfs://nameserivce/data/hudi/hudi_table/'. |
| table.type | String | Yes | - | The type of hudi table. Now we only support 'cow', 'mor' is not support yet. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.apache.seatunnel.engine.client.job.JobExecutionEnvironment;
import org.apache.seatunnel.engine.common.config.ConfigProvider;
import org.apache.seatunnel.engine.common.config.JobConfig;
import org.apache.seatunnel.engine.core.job.JobResult;
import org.apache.seatunnel.engine.core.job.JobStatus;
import org.apache.seatunnel.engine.server.SeaTunnelServerStarter;

Expand Down Expand Up @@ -129,6 +130,32 @@ public void cancelJobTest() throws Exception {
objectCompletableFuture.get())));
}

@Test
public void testExpiredJobWasDeleted() throws Exception {
Common.setDeployMode(DeployMode.CLIENT);
String filePath = TestUtils.getResource("batch_fakesource_to_file.conf");
JobConfig jobConfig = new JobConfig();
jobConfig.setName("job_expire");

ClientConfig clientConfig = ConfigProvider.locateAndGetClientConfig();
clientConfig.setClusterName(TestUtils.getClusterName("JobExecutionIT"));
SeaTunnelClient engineClient = new SeaTunnelClient(clientConfig);
JobExecutionEnvironment jobExecutionEnv =
engineClient.createExecutionContext(filePath, jobConfig);

final ClientJobProxy clientJobProxy = jobExecutionEnv.execute();

JobResult result = clientJobProxy.doWaitForJobComplete().get();
Assertions.assertEquals(result.getStatus(), JobStatus.FINISHED);
Awaitility.await()
.atMost(65, TimeUnit.SECONDS)
.untilAsserted(
() ->
Assertions.assertThrowsExactly(
NullPointerException.class,
() -> clientJobProxy.getJobStatus()));
}

@AfterAll
static void afterClass() {
if (hazelcastInstance != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

seatunnel:
engine:
history-job-expire-minutes: 1
backup-count: 2
queue-type: blockingqueue
print-execution-info-interval: 10
Expand Down

0 comments on commit 7542853

Please sign in to comment.