File tree Expand file tree Collapse file tree
gcloud-java-compute/src/main/java/com/google/gcloud/compute/testing Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,9 @@ public ComputeOptions options() {
5454
5555 /**
5656 * Returns a base name for testing resources generated using a random UUID. This base name can be
57- * prepended to resource names to prevent name clashes.
57+ * prepended to resource names to prevent name clashes. This method always returns a 30 characters
58+ * long prefix. Since Compute Engine resource names can be at most 63 characters long your suffix
59+ * should be no longer than 33 characters.
5860 */
5961 public static String baseResourceName () {
6062 return "test-" + UUID .randomUUID ().toString ().replace ("-" , "" ).substring (0 , 24 ) + "-" ;
@@ -69,8 +71,7 @@ public static String baseResourceName() {
6971 * @return A {@code RemoteComputeHelper} object for the provided options
7072 * @throws ComputeHelperException if {@code keyStream} is not a valid JSON key stream
7173 */
72- public static RemoteComputeHelper create (String projectId , InputStream keyStream )
73- throws ComputeHelperException {
74+ public static RemoteComputeHelper create (String projectId , InputStream keyStream ) {
7475 try {
7576 ComputeOptions computeOptions = ComputeOptions .builder ()
7677 .authCredentials (AuthCredentials .createForJson (keyStream ))
You can’t perform that action at this time.
0 commit comments