File tree 1 file changed +4
-3
lines changed
gcloud-java-compute/src/main/java/com/google/gcloud/compute/testing
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,9 @@ public ComputeOptions options() {
54
54
55
55
/**
56
56
* 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.
58
60
*/
59
61
public static String baseResourceName () {
60
62
return "test-" + UUID .randomUUID ().toString ().replace ("-" , "" ).substring (0 , 24 ) + "-" ;
@@ -69,8 +71,7 @@ public static String baseResourceName() {
69
71
* @return A {@code RemoteComputeHelper} object for the provided options
70
72
* @throws ComputeHelperException if {@code keyStream} is not a valid JSON key stream
71
73
*/
72
- public static RemoteComputeHelper create (String projectId , InputStream keyStream )
73
- throws ComputeHelperException {
74
+ public static RemoteComputeHelper create (String projectId , InputStream keyStream ) {
74
75
try {
75
76
ComputeOptions computeOptions = ComputeOptions .builder ()
76
77
.authCredentials (AuthCredentials .createForJson (keyStream ))
You can’t perform that action at this time.
0 commit comments