diff --git a/clirr-ignored-differences.xml b/clirr-ignored-differences.xml new file mode 100644 index 00000000..63680b26 --- /dev/null +++ b/clirr-ignored-differences.xml @@ -0,0 +1,10 @@ + + + + + 7012 + com/google/cloud/conformance/storage/v1/Method* + * *Group*(*) + + + diff --git a/conformance-tests b/conformance-tests index 6f883359..ec2e8c3d 160000 --- a/conformance-tests +++ b/conformance-tests @@ -1 +1 @@ -Subproject commit 6f88335938cd1d90372a447e01d7d71014e37ceb +Subproject commit ec2e8c3d312e7122e07f65e98639169515449aa8 diff --git a/src/main/java/com/google/cloud/conformance/storage/v1/Method.java b/src/main/java/com/google/cloud/conformance/storage/v1/Method.java index 668815a4..8bd79f57 100644 --- a/src/main/java/com/google/cloud/conformance/storage/v1/Method.java +++ b/src/main/java/com/google/cloud/conformance/storage/v1/Method.java @@ -41,6 +41,7 @@ private Method(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Method() { name_ = ""; resources_ = java.util.Collections.emptyList(); + group_ = ""; } @java.lang.Override @@ -105,6 +106,13 @@ private Method( input.popLimit(oldLimit); break; } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + group_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -260,6 +268,55 @@ public int getResourcesValue(int index) { private int resourcesMemoizedSerializedSize; + public static final int GROUP_FIELD_NUMBER = 3; + private volatile java.lang.Object group_; + /** + * + * + *
+   * e.g. storage.resumable.upload
+   * 
+ * + * string group = 3; + * + * @return The group. + */ + @java.lang.Override + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } + } + /** + * + * + *
+   * e.g. storage.resumable.upload
+   * 
+ * + * string group = 3; + * + * @return The bytes for group. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -285,6 +342,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < resources_.size(); i++) { output.writeEnumNoTag(resources_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, group_); + } unknownFields.writeTo(output); } @@ -309,6 +369,9 @@ public int getSerializedSize() { } resourcesMemoizedSerializedSize = dataSize; } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(group_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, group_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -327,6 +390,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!resources_.equals(other.resources_)) return false; + if (!getGroup().equals(other.getGroup())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -344,6 +408,8 @@ public int hashCode() { hash = (37 * hash) + RESOURCES_FIELD_NUMBER; hash = (53 * hash) + resources_.hashCode(); } + hash = (37 * hash) + GROUP_FIELD_NUMBER; + hash = (53 * hash) + getGroup().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -494,6 +560,8 @@ public Builder clear() { resources_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); + group_ = ""; + return this; } @@ -528,6 +596,7 @@ public com.google.cloud.conformance.storage.v1.Method buildPartial() { bitField0_ = (bitField0_ & ~0x00000001); } result.resources_ = resources_; + result.group_ = group_; onBuilt(); return result; } @@ -591,6 +660,10 @@ public Builder mergeFrom(com.google.cloud.conformance.storage.v1.Method other) { } onChanged(); } + if (!other.getGroup().isEmpty()) { + group_ = other.group_; + onChanged(); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -877,6 +950,112 @@ public Builder addAllResourcesValue(java.lang.Iterable values return this; } + private java.lang.Object group_ = ""; + /** + * + * + *
+     * e.g. storage.resumable.upload
+     * 
+ * + * string group = 3; + * + * @return The group. + */ + public java.lang.String getGroup() { + java.lang.Object ref = group_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + group_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * e.g. storage.resumable.upload
+     * 
+ * + * string group = 3; + * + * @return The bytes for group. + */ + public com.google.protobuf.ByteString getGroupBytes() { + java.lang.Object ref = group_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + group_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * e.g. storage.resumable.upload
+     * 
+ * + * string group = 3; + * + * @param value The group to set. + * @return This builder for chaining. + */ + public Builder setGroup(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + group_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * e.g. storage.resumable.upload
+     * 
+ * + * string group = 3; + * + * @return This builder for chaining. + */ + public Builder clearGroup() { + + group_ = getDefaultInstance().getGroup(); + onChanged(); + return this; + } + /** + * + * + *
+     * e.g. storage.resumable.upload
+     * 
+ * + * string group = 3; + * + * @param value The bytes for group to set. + * @return This builder for chaining. + */ + public Builder setGroupBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + group_ = value; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); diff --git a/src/main/java/com/google/cloud/conformance/storage/v1/MethodOrBuilder.java b/src/main/java/com/google/cloud/conformance/storage/v1/MethodOrBuilder.java index fe813e2b..13875a16 100644 --- a/src/main/java/com/google/cloud/conformance/storage/v1/MethodOrBuilder.java +++ b/src/main/java/com/google/cloud/conformance/storage/v1/MethodOrBuilder.java @@ -80,4 +80,29 @@ public interface MethodOrBuilder * @return The enum numeric value on the wire of resources at the given index. */ int getResourcesValue(int index); + + /** + * + * + *
+   * e.g. storage.resumable.upload
+   * 
+ * + * string group = 3; + * + * @return The group. + */ + java.lang.String getGroup(); + /** + * + * + *
+   * e.g. storage.resumable.upload
+   * 
+ * + * string group = 3; + * + * @return The bytes for group. + */ + com.google.protobuf.ByteString getGroupBytes(); } diff --git a/src/main/java/com/google/cloud/conformance/storage/v1/Tests.java b/src/main/java/com/google/cloud/conformance/storage/v1/Tests.java index 9023a77b..fba173e3 100644 --- a/src/main/java/com/google/cloud/conformance/storage/v1/Tests.java +++ b/src/main/java/com/google/cloud/conformance/storage/v1/Tests.java @@ -145,22 +145,22 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "v1.PolicyOutput\"P\n\nRetryTests\022B\n\nretryTe" + "sts\030\001 \003(\0132..google.cloud.conformance.sto" + "rage.v1.RetryTest\"\'\n\017InstructionList\022\024\n\014" - + "instructions\030\001 \003(\t\"X\n\006Method\022\014\n\004name\030\001 \001" + + "instructions\030\001 \003(\t\"g\n\006Method\022\014\n\004name\030\001 \001" + "(\t\022@\n\tresources\030\002 \003(\0162-.google.cloud.con" - + "formance.storage.v1.Resource\"\344\001\n\tRetryTe" - + "st\022\n\n\002id\030\001 \001(\005\022\023\n\013description\030\002 \001(\t\022C\n\005c" - + "ases\030\003 \003(\01324.google.cloud.conformance.st" - + "orage.v1.InstructionList\022<\n\007methods\030\004 \003(" - + "\0132+.google.cloud.conformance.storage.v1." - + "Method\022\034\n\024preconditionProvided\030\005 \001(\010\022\025\n\r" - + "expectSuccess\030\006 \001(\010*O\n\010UrlStyle\022\016\n\nPATH_" - + "STYLE\020\000\022\030\n\024VIRTUAL_HOSTED_STYLE\020\001\022\031\n\025BUC" - + "KET_BOUND_HOSTNAME\020\002*B\n\010Resource\022\n\n\006BUCK" - + "ET\020\000\022\n\n\006OBJECT\020\001\022\020\n\014NOTIFICATION\020\002\022\014\n\010HM" - + "AC_KEY\020\003B|\n\'com.google.cloud.conformance" - + ".storage.v1P\001Z#google/cloud/conformance/" - + "storage/v1\252\002)Google.Cloud.Storage.V1.Tes" - + "ts.Conformanceb\006proto3" + + "formance.storage.v1.Resource\022\r\n\005group\030\003 " + + "\001(\t\"\344\001\n\tRetryTest\022\n\n\002id\030\001 \001(\005\022\023\n\013descrip" + + "tion\030\002 \001(\t\022C\n\005cases\030\003 \003(\01324.google.cloud" + + ".conformance.storage.v1.InstructionList\022" + + "<\n\007methods\030\004 \003(\0132+.google.cloud.conforma" + + "nce.storage.v1.Method\022\034\n\024preconditionPro" + + "vided\030\005 \001(\010\022\025\n\rexpectSuccess\030\006 \001(\010*O\n\010Ur" + + "lStyle\022\016\n\nPATH_STYLE\020\000\022\030\n\024VIRTUAL_HOSTED" + + "_STYLE\020\001\022\031\n\025BUCKET_BOUND_HOSTNAME\020\002*B\n\010R" + + "esource\022\n\n\006BUCKET\020\000\022\n\n\006OBJECT\020\001\022\020\n\014NOTIF" + + "ICATION\020\002\022\014\n\010HMAC_KEY\020\003B|\n\'com.google.cl" + + "oud.conformance.storage.v1P\001Z#google/clo" + + "ud/conformance/storage/v1\252\002)Google.Cloud" + + ".Storage.V1.Tests.Conformanceb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -308,7 +308,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_conformance_storage_v1_Method_descriptor, new java.lang.String[] { - "Name", "Resources", + "Name", "Resources", "Group", }); internal_static_google_cloud_conformance_storage_v1_RetryTest_descriptor = getDescriptor().getMessageTypes().get(10); diff --git a/src/main/proto/google/cloud/conformance/storage/v1/tests.proto b/src/main/proto/google/cloud/conformance/storage/v1/tests.proto index 949948bf..91fa972a 100644 --- a/src/main/proto/google/cloud/conformance/storage/v1/tests.proto +++ b/src/main/proto/google/cloud/conformance/storage/v1/tests.proto @@ -189,6 +189,7 @@ enum Resource { message Method { string name = 1; // e.g. storage.objects.get repeated Resource resources = 2; + string group = 3; // e.g. storage.resumable.upload } // Schema for a retry test, corresponding to a single scenario from the design diff --git a/src/main/resources/com/google/cloud/conformance/storage/v1/retry_tests.json b/src/main/resources/com/google/cloud/conformance/storage/v1/retry_tests.json index 48d87f42..af7874ef 100644 --- a/src/main/resources/com/google/cloud/conformance/storage/v1/retry_tests.json +++ b/src/main/resources/com/google/cloud/conformance/storage/v1/retry_tests.json @@ -239,6 +239,43 @@ ], "preconditionProvided": true, "expectSuccess": false + }, + { + "id": 7, + "description": "resumable_uploads_handle_complex_retries", + "cases": [ + { + "instructions": ["return-reset-connection", "return-503"] + }, + { + "instructions": ["return-503-after-256K"] + }, + { + "instructions": ["return-503-after-8192K"] + } + ], + "methods": [ + {"name": "storage.objects.insert", "group": "storage.resumable.upload", "resources": ["BUCKET"]} + ], + "preconditionProvided": true, + "expectSuccess": true + }, + { + "id": 8, + "description": "downloads_handle_complex_retries", + "cases": [ + { + "instructions": ["return-broken-stream", "return-broken-stream"] + }, + { + "instructions": ["return-broken-stream-after-256K"] + } + ], + "methods": [ + {"name": "storage.objects.get", "group": "storage.objects.download", "resources": ["BUCKET", "OBJECT"]} + ], + "preconditionProvided": false, + "expectSuccess": true } ] }