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

uber / cadence-java-client / 2616

06 Nov 2024 07:00PM UTC coverage: 76.181% (-2.0%) from 78.135%
2616

Pull #945

buildkite

shijiesheng
remove unneeded file
Pull Request #945: fix unimplementented methods of TestWorkflowEnvironment

4 of 10 new or added lines in 2 files covered. (40.0%)

414 existing lines in 7 files now uncovered.

14770 of 19388 relevant lines covered (76.18%)

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

18
import com.google.protobuf.ByteString;
19
import com.google.protobuf.Duration;
20
import com.google.protobuf.Int64Value;
21
import com.google.protobuf.Timestamp;
22
import com.google.protobuf.util.Durations;
23
import com.google.protobuf.util.Timestamps;
24

25
class Helpers {
×
26

27
  static long toInt64Value(Int64Value v) {
UNCOV
28
    return v.getValue();
×
29
  }
30

31
  static long timeToUnixNano(Timestamp t) {
32
    return Timestamps.toNanos(t);
1✔
33
  }
34

35
  static int durationToDays(Duration d) {
36
    return (int) Durations.toDays(d);
1✔
37
  }
38

39
  static int durationToSeconds(Duration d) {
40
    return (int) Durations.toSeconds(d);
1✔
41
  }
42

43
  static byte[] byteStringToArray(ByteString t) {
44
    if (t == null || t.size() == 0) {
1✔
45
      return null;
×
46
    }
47
    return t.toByteArray();
1✔
48
  }
49
}
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