Search in sources :

Example 6 with ScriptJobConfiguration

use of com.dangdang.ddframe.job.config.script.ScriptJobConfiguration in project elastic-job by dangdangdotcom.

the class ScriptElasticJobTest method assertJobInit.

@Test
public void assertJobInit() throws IOException {
    ScriptElasticJobUtil.buildScriptCommandLine();
    WaitingUtils.waitingShortTime();
    String scriptCommandLine = ((ScriptJobConfiguration) getLiteJobConfig().getTypeConfig()).getScriptCommandLine();
    LiteJobConfiguration liteJobConfig = LiteJobConfigurationGsonFactory.fromJson(getRegCenter().get("/" + getJobName() + "/config"));
    assertThat(((ScriptJobConfiguration) liteJobConfig.getTypeConfig()).getScriptCommandLine(), is(scriptCommandLine));
}
Also used : LiteJobConfiguration(com.dangdang.ddframe.job.lite.config.LiteJobConfiguration) ScriptJobConfiguration(com.dangdang.ddframe.job.config.script.ScriptJobConfiguration) AbstractBaseStdJobAutoInitTest(com.dangdang.ddframe.job.lite.integrate.AbstractBaseStdJobAutoInitTest) Test(org.junit.Test)

Aggregations

ScriptJobConfiguration (com.dangdang.ddframe.job.config.script.ScriptJobConfiguration)6 DataflowJobConfiguration (com.dangdang.ddframe.job.config.dataflow.DataflowJobConfiguration)3 JobCoreConfiguration (com.dangdang.ddframe.job.config.JobCoreConfiguration)2 JobTypeConfiguration (com.dangdang.ddframe.job.config.JobTypeConfiguration)2 SimpleJobConfiguration (com.dangdang.ddframe.job.config.simple.SimpleJobConfiguration)2 LiteJobConfiguration (com.dangdang.ddframe.job.lite.config.LiteJobConfiguration)2 Test (org.junit.Test)2 ScriptJob (com.dangdang.ddframe.job.api.script.ScriptJob)1 JobScheduler (com.dangdang.ddframe.job.lite.api.JobScheduler)1 AbstractBaseStdJobAutoInitTest (com.dangdang.ddframe.job.lite.integrate.AbstractBaseStdJobAutoInitTest)1