Search in sources :

Example 1 with ContainerResources

use of com.netflix.titus.grpc.protogen.ContainerResources in project titus-control-plane by Netflix.

the class JobSubmitAndControlNegativeTest method testJobWithInvalidEfsMounts.

@Test(timeout = TEST_TIMEOUT_MS)
public void testJobWithInvalidEfsMounts() {
    ContainerResources badEfs = ContainerResources.newBuilder().addEfsMounts(ContainerResources.EfsMount.getDefaultInstance()).build();
    submitBadJob(client, BATCH_JOB_DESCR_BUILDER.setContainer(BATCH_JOB_DESCR_BUILDER.getContainer().toBuilder().setResources(badEfs)).build(), "container.containerResources.efsMounts[0].efsId", "container.containerResources.efsMounts[0].mountPoint");
}
Also used : ContainerResources(com.netflix.titus.grpc.protogen.ContainerResources) BaseIntegrationTest(com.netflix.titus.master.integration.BaseIntegrationTest) IntegrationTest(com.netflix.titus.testkit.junit.category.IntegrationTest) Test(org.junit.Test)

Example 2 with ContainerResources

use of com.netflix.titus.grpc.protogen.ContainerResources in project titus-control-plane by Netflix.

the class JobSubmitAndControlNegativeTest method testJobWithInvalidComputeResources.

@Test(timeout = TEST_TIMEOUT_MS)
public void testJobWithInvalidComputeResources() {
    ContainerResources badContainer = ContainerResources.newBuilder().setGpu(-1).build();
    submitBadJob(client, BATCH_JOB_DESCR_BUILDER.setContainer(BATCH_JOB_DESCR_BUILDER.getContainer().toBuilder().setResources(badContainer)).build(), "container.containerResources.gpu");
}
Also used : ContainerResources(com.netflix.titus.grpc.protogen.ContainerResources) BaseIntegrationTest(com.netflix.titus.master.integration.BaseIntegrationTest) IntegrationTest(com.netflix.titus.testkit.junit.category.IntegrationTest) Test(org.junit.Test)

Example 3 with ContainerResources

use of com.netflix.titus.grpc.protogen.ContainerResources in project titus-control-plane by Netflix.

the class JobSubmitAndControlNegativeTest method testJobWithExcessiveComputeResources.

/**
 * TODO GPU is not limited today. We should add GPU to {@link ResourceDimension} model.
 */
@Test(timeout = TEST_TIMEOUT_MS)
public void testJobWithExcessiveComputeResources() {
    ContainerResources badContainer = ContainerResources.newBuilder().setCpu(100).setGpu(100).setMemoryMB(1000_000_000).setDiskMB(1000_000_000).setNetworkMbps(10_000_000).build();
    submitBadJob(client, BATCH_JOB_DESCR_BUILDER.setContainer(BATCH_JOB_DESCR_BUILDER.getContainer().toBuilder().setResources(badContainer)).build(), "container.containerResources.cpu", "container.containerResources.gpu", "container.containerResources.memoryMB", "container.containerResources.networkMbps", "container.containerResources.diskMB");
}
Also used : ContainerResources(com.netflix.titus.grpc.protogen.ContainerResources) BaseIntegrationTest(com.netflix.titus.master.integration.BaseIntegrationTest) IntegrationTest(com.netflix.titus.testkit.junit.category.IntegrationTest) Test(org.junit.Test)

Aggregations

ContainerResources (com.netflix.titus.grpc.protogen.ContainerResources)3 BaseIntegrationTest (com.netflix.titus.master.integration.BaseIntegrationTest)3 IntegrationTest (com.netflix.titus.testkit.junit.category.IntegrationTest)3 Test (org.junit.Test)3