Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
improves assertion messages
Browse files Browse the repository at this point in the history
avoids warnings due to presence of overloaded methods in grpc client
  • Loading branch information
shamsimam committed Jul 11, 2019
1 parent de02079 commit 62dc8bf
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 112 deletions.
2 changes: 1 addition & 1 deletion containers/test-apps/courier/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>twosigma</groupId>
<artifactId>courier</artifactId>
<version>1.4.3</version>
<version>1.4.4</version>

<name>courier</name>
<url>https://github.com/twosigma/waiter/tree/master/test-apps/courier</url>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,24 +452,6 @@ private void resolveResponsePromise() {
}
}

public static RpcResult<List<CourierSummary>> collectPackages(final String host,
final int port,
final Map<String, Object> headers,
final String idPrefix,
final String from,
final List<String> messages,
final int interMessageSleepMs,
final boolean lockStepMode,
final int cancelThreshold) throws InterruptedException {

final List<String> ids = new ArrayList<>(messages.size());
for (int i = 0; i < messages.size(); i++) {
ids.add(idPrefix + i);
}

return collectPackages(host, port, headers, ids, from, messages, interMessageSleepMs, lockStepMode, cancelThreshold);
}

/**
* Greet server. If provided, the first element of {@code args} is the name to use in the
* greeting.
Expand Down Expand Up @@ -533,8 +515,9 @@ private static void runSendPackageSendError(final String host, final int port) t
private static void runCollectPackagesSuccess(final String host, final int port) throws InterruptedException {
final HashMap<String, Object> headers = new HashMap<>();
headers.put("x-cid", "cid-collect-packages-success." + System.currentTimeMillis());
final List<String> ids = IntStream.range(0, 10).mapToObj(i -> "id-" + i).collect(Collectors.toList());
final List<String> messages = IntStream.range(0, 10).mapToObj(i -> "message-" + i).collect(Collectors.toList());
final RpcResult<List<CourierSummary>> rpcResult = collectPackages(host, port, headers, "id-", "User", messages, 100, true, messages.size() + 1);
final RpcResult<List<CourierSummary>> rpcResult = collectPackages(host, port, headers, ids, "User", messages, 100, true, messages.size() + 1);
final List<CourierSummary> courierSummaries = rpcResult.result();
logFunction.apply("collectPackages[success] summary = " + courierSummaries);
final Status status = rpcResult.status();
Expand Down
Loading

0 comments on commit 62dc8bf

Please sign in to comment.