use of io.cdap.cdap.runtime.spi.ProgramRunInfo in project cdap by caskdata.
the class DataprocRuntimeJobManagerTest method longJobNameTest.
@Test
public void longJobNameTest() {
ProgramRunInfo runInfo = new ProgramRunInfo.Builder().setNamespace("namespace").setApplication("very_very_long_app_name_is_provided_this_should_be" + "_trimed_so_that_correct_name_is_produced").setVersion("1.0").setProgramType("workflow").setProgram("program").setRun(UUID.randomUUID().toString()).build();
String jobName = DataprocRuntimeJobManager.getJobId(runInfo);
Assert.assertTrue(jobName.startsWith("namespace_very_very_long_app_name_is_provided_this_should_be_tr_"));
Assert.assertEquals(100, jobName.length());
}
Aggregations