Search in sources :

Example 1 with SetInstanceAcceleratorRequest

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());
}
Also used : Instance(com.google.cloud.notebooks.v1beta1.Instance) SetInstanceAcceleratorRequest(com.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest) Test(org.junit.Test)

Aggregations

Instance (com.google.cloud.notebooks.v1beta1.Instance)1 SetInstanceAcceleratorRequest (com.google.cloud.notebooks.v1beta1.SetInstanceAcceleratorRequest)1 Test (org.junit.Test)1