• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / cadence-java-client / 1878

pending completion
1878

push

buildkite

web-flow
Update rpc-caller header of grpc (#824)

This might be a breaking change since it updates the rpc-caller header of grpc from uber-java to be a variable from clientOptions.
If there is any dependency on the value uber-java, updates the corresponding clientOptions value to be uber-java

1 of 1 new or added line in 1 file covered. (100.0%)

11123 of 18414 relevant lines covered (60.41%)

0.6 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.5
/src/main/java/com/uber/cadence/internal/worker/BlockCallerPolicy.java
1
/*
2
 *  Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
 *
4
 *  Modifications copyright (C) 2017 Uber Technologies, Inc.
5
 *
6
 *  Licensed under the Apache License, Version 2.0 (the "License"). You may not
7
 *  use this file except in compliance with the License. A copy of the License is
8
 *  located at
9
 *
10
 *  http://aws.amazon.com/apache2.0
11
 *
12
 *  or in the "license" file accompanying this file. This file is distributed on
13
 *  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14
 *  express or implied. See the License for the specific language governing
15
 *  permissions and limitations under the License.
16
 */
17

18
package com.uber.cadence.internal.worker;
19

20
import java.util.concurrent.RejectedExecutionException;
21
import java.util.concurrent.RejectedExecutionHandler;
22
import java.util.concurrent.ThreadPoolExecutor;
23

24
class BlockCallerPolicy implements RejectedExecutionHandler {
1✔
25

26
  @Override
27
  public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
28
    // Without this check the call hangs forever on the queue put.
29
    if (executor.isShutdown()) {
1✔
30
      throw new RejectedExecutionException("Executor is shutdown");
×
31
    }
32
    try {
33
      // block until there's room
34
      executor.getQueue().put(r);
1✔
35
    } catch (InterruptedException e) {
×
36
      throw new RejectedExecutionException("Unexpected InterruptedException", e);
×
37
    }
1✔
38
  }
1✔
39
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc