use of com.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest in project java-notebooks by googleapis.
the class ITNotebookServiceClientTest method testSetInstanceAccelarator.
@Test
public void testSetInstanceAccelarator() throws ExecutionException, InterruptedException {
this.stopInstance();
SetInstanceAcceleratorRequest request = SetInstanceAcceleratorRequest.newBuilder().setName(INSTANCE_NAME).setType(Instance.AcceleratorType.NVIDIA_TESLA_P4).setCoreCount(1L).build();
Instance response = client.setInstanceAcceleratorAsync(request).get();
this.startInstance();
assertEquals(response.getAcceleratorConfig().getType().name(), Instance.AcceleratorType.NVIDIA_TESLA_P4.name());
}
Aggregations