aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/rpc/python/kernel_tests/test_example.proto
blob: 8141466349afcebcd104153a9f28c8f382458098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Test description and protos to work with it.

syntax = "proto2";

package tensorflow.contrib.rpc;

// A TestCase holds a sequence of values.
message TestCase {
  repeated int32 values = 1;
};

service TestCaseService {
  // Copy input, and increment each entry in 'values' by 1.
  rpc Increment(TestCase) returns (TestCase) {
  }

  // Sleep forever.
  rpc SleepForever(TestCase) returns (TestCase) {
  }

  // Sleep forever 50% of the time, return immediately the other 50%.
  rpc SometimesSleepForever(TestCase) returns (TestCase) {
  }

  // Always fails with InvalidArgument.
  rpc AlwaysFailWithInvalidArgument(TestCase) returns (TestCase) {
  }

  // Fails with InvalidArgument 50% of the time.
  rpc SometimesFailWithInvalidArgument(TestCase) returns (TestCase) {
  }
};