Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
miraleung committed Jun 4, 2021
1 parent f5e187a commit fccf652
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rules_bazel/java/integration_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _diff_integration_goldens_impl(ctx):
rm -rf $(find ./ -type f -name 'PlaceholderFile.java')
rm -r $(find ./ -type d -empty)
cd ..
diff -r --context=50 codegen_tmp test/integration/goldens/{api_name} > {diff_output}
diff -r codegen_tmp test/integration/goldens/{api_name} > {diff_output}
# Bash `diff` command will return exit code 1 when there are differences between the two
# folders. So we explicitly `exit 0` after the diff command to avoid build failure.
exit 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ protected List<Statement> createClassMemberFieldDecls(
.setIsStatic(true)
.build()))
.collect(Collectors.toList()));

fieldDeclStatements.addAll(
classMemberVarExprs.values().stream()
.filter(v -> !isMockVarExprFn.apply(v))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected MethodDefinition createStartStaticServerMethod(
varInitExprs.add(serviceToVarInitExprFn.apply(service));
mockServiceVarExprs.add(serviceToVarExprFn.apply(service));
// Careful: Java 8 and 11 make different ordering choices if this set is not explicitly sorted.
// In Java 11, lexicographic or insertion order is not preserved.
// Context: https://github.com/googleapis/gapic-generator-java/pull/750
for (Service mixinService :
context.mixinServices().stream()
.sorted((s1, s2) -> s2.name().compareTo(s1.name()))
Expand Down
4 changes: 2 additions & 2 deletions test/integration/apis/kms/v1/cloudkms_test_mixins_v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ documentation:
Manages keys and performs cryptographic operations in a central cloud
service, for direct use by other cloud resources and applications.
rules:
# This RPC shouldn't appear in the proto, since it's been cloberred by KMS's definition in the proto.
# This RPC shouldn't appear in the proto, since it's been clobered by KMS's definition in the proto.
- selector: google.iam.v1.IAMPolicy.GetIamPolicy
description: |-
Gets the access control policy for a resource. Returns an empty policy
if the resource exists and does not have a policy set.
# This RPC shouldn't appear in the proto, since it's not in the HTTP rules list below,
# This RPC shouldn't appear in the proto, since it's not in the HTTP rules list below,
# even though the documentation field is set.
- selector: google.iam.v1.IAMPolicy.SetIamPolicy
description: |-
Expand Down

0 comments on commit fccf652

Please sign in to comment.