aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test
diff options
context:
space:
mode:
authorGravatar olaola <olaola@google.com>2017-07-14 10:07:50 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-07-14 10:53:33 +0200
commit0d31014a178eef578ea4f0db4607fe723b96154c (patch)
tree6a21969e1f55afe81e6b8991656c21dc839a1112 /src/test
parentb89b7ee3f1f8497f7e86fd90b2e0df95b7631b46 (diff)
Sorting the Action output files.
PiperOrigin-RevId: 161925075
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java
index 87322359ca..2a39ba9bc1 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/GrpcRemoteExecutionClientTest.java
@@ -167,7 +167,29 @@ public class GrpcRemoteExecutionClientTest {
ImmutableMap.of("VARIABLE", "value"),
/*executionInfo=*/ ImmutableMap.<String, String>of(),
/*inputs=*/ ImmutableList.of(ActionInputHelper.fromPath("input")),
- /*outputs=*/ ImmutableList.<ActionInput>of(),
+ /*outputs=*/ ImmutableList.<ActionInput>of(
+ new ActionInput() {
+ @Override
+ public String getExecPathString() {
+ return "foo";
+ }
+
+ @Override
+ public PathFragment getExecPath() {
+ return null; // unused here.
+ }
+ },
+ new ActionInput() {
+ @Override
+ public String getExecPathString() {
+ return "bar";
+ }
+
+ @Override
+ public PathFragment getExecPath() {
+ return null; // unused here.
+ }
+ }),
ResourceSet.ZERO);
Path stdout = fs.getPath("/tmp/stdout");
@@ -335,6 +357,10 @@ public class GrpcRemoteExecutionClientTest {
new ExecutionImplBase() {
@Override
public void execute(ExecuteRequest request, StreamObserver<Operation> responseObserver) {
+ // Check that the output files are sorted.
+ assertThat(request.getAction().getOutputFilesList())
+ .containsExactly("bar", "foo")
+ .inOrder();
responseObserver.onNext(
Operation.newBuilder()
.setDone(true)