Search in sources :

Example 11 with JobConfig

use of com.ibm.streamsx.topology.jobconfig.JobConfig in project streamsx.topology by IBMStreams.

the class JobConfigSubmissionTest method testGroupJobConfig.

@Test
public void testGroupJobConfig() throws Exception {
    JobConfig config = new JobConfig();
    config.setJobGroup("default");
    List<String> result = testItDirect("testGroupJobConfig", config);
    // job id       
    assertFalse(result.get(0).isEmpty());
    // job name
    assertFalse(result.get(2).isEmpty());
    // job group
    assertEquals("default", result.get(2));
    // data-directory
    assertEquals("<empty>", result.get(3));
}
Also used : JobConfig(com.ibm.streamsx.topology.jobconfig.JobConfig) Test(org.junit.Test)

Example 12 with JobConfig

use of com.ibm.streamsx.topology.jobconfig.JobConfig in project streamsx.topology by IBMStreams.

the class JobSubmissionAPITest method testEmptyJobConfig.

@Test
public void testEmptyJobConfig() {
    JobConfig jc = new JobConfig();
    assertNull(jc.getJobGroup());
    assertNull(jc.getJobName());
    _testMostlyEmptyJobConfig(jc);
}
Also used : JobConfig(com.ibm.streamsx.topology.jobconfig.JobConfig) Test(org.junit.Test)

Example 13 with JobConfig

use of com.ibm.streamsx.topology.jobconfig.JobConfig in project streamsx.topology by IBMStreams.

the class JobSubmissionAPITest method testFromConfigJobConfig.

@Test
public void testFromConfigJobConfig() {
    Map<String, Object> config = new HashMap<>();
    JobConfig jc = new JobConfig();
    jc.setJobGroup("groupE");
    jc.setJobName("nameF");
    config.put(JobProperties.CONFIG, jc);
    JobConfig jcc = JobConfig.fromProperties(config);
    assertSame(jc, jcc);
    config.put(JobProperties.GROUP, "groupC");
    config.put(JobProperties.NAME, "nameD");
    jcc = JobConfig.fromProperties(config);
    assertSame(jc, jcc);
    assertEquals("groupE", jc.getJobGroup());
    assertEquals("nameF", jc.getJobName());
}
Also used : HashMap(java.util.HashMap) JobConfig(com.ibm.streamsx.topology.jobconfig.JobConfig) Test(org.junit.Test)

Example 14 with JobConfig

use of com.ibm.streamsx.topology.jobconfig.JobConfig in project streamsx.topology by IBMStreams.

the class JobSubmissionAPITest method testConstructedJobConfig.

@Test
public void testConstructedJobConfig() {
    JobConfig jc = new JobConfig("groupY", "nameX");
    assertEquals("groupY", jc.getJobGroup());
    assertEquals("nameX", jc.getJobName());
    _testMostlyEmptyJobConfig(jc);
}
Also used : JobConfig(com.ibm.streamsx.topology.jobconfig.JobConfig) Test(org.junit.Test)

Example 15 with JobConfig

use of com.ibm.streamsx.topology.jobconfig.JobConfig in project streamsx.topology by IBMStreams.

the class JobSubmissionAPITest method testSettersJobConfig.

@Test
public void testSettersJobConfig() {
    JobConfig jc = new JobConfig();
    jc.setJobGroup("groupYY");
    jc.setJobName("nameXX");
    assertEquals("groupYY", jc.getJobGroup());
    assertEquals("nameXX", jc.getJobName());
}
Also used : JobConfig(com.ibm.streamsx.topology.jobconfig.JobConfig) Test(org.junit.Test)

Aggregations

JobConfig (com.ibm.streamsx.topology.jobconfig.JobConfig)15 Test (org.junit.Test)10 HashMap (java.util.HashMap)5 JsonObject (com.google.gson.JsonObject)3 Topology (com.ibm.streamsx.topology.Topology)3 File (java.io.File)3 TestTopology (com.ibm.streamsx.topology.test.TestTopology)2 BigInteger (java.math.BigInteger)2 ArrayList (java.util.ArrayList)2 JsonArray (com.google.gson.JsonArray)1 TraceLevel (com.ibm.streams.operator.logging.TraceLevel)1 Version (com.ibm.streams.operator.version.Version)1 StreamsContext (com.ibm.streamsx.topology.context.StreamsContext)1 JobConfigOverlay (com.ibm.streamsx.topology.internal.streams.JobConfigOverlay)1 SubmissionParameter (com.ibm.streamsx.topology.jobconfig.SubmissionParameter)1 IOException (java.io.IOException)1 Scanner (java.util.Scanner)1 Level (java.util.logging.Level)1