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

uber / cadence-java-client / 2632

07 Nov 2024 12:17AM UTC coverage: 78.326% (-1.5%) from 79.78%
2632

Pull #951

buildkite

fimanishi
Add tests for PollerOptions.java
Pull Request #951: Add tests for PollerOptions.java

15185 of 19387 relevant lines covered (78.33%)

0.78 hits per line

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

42.11
/src/main/java/com/uber/cadence/internal/replay/ContinueAsNewWorkflowExecutionParameters.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.replay;
19

20
import java.nio.charset.StandardCharsets;
21

22
public final class ContinueAsNewWorkflowExecutionParameters {
1✔
23

24
  private int executionStartToCloseTimeoutSeconds;
25
  private byte[] input;
26
  private String taskList;
27
  private int taskStartToCloseTimeoutSeconds;
28
  private String workflowType;
29

30
  public void setWorkflowType(String workflowType) {
31
    this.workflowType = workflowType;
1✔
32
  }
1✔
33

34
  public String getWorkflowType() {
35
    return workflowType;
1✔
36
  }
37

38
  public int getExecutionStartToCloseTimeoutSeconds() {
39
    return executionStartToCloseTimeoutSeconds;
1✔
40
  }
41

42
  public void setExecutionStartToCloseTimeoutSeconds(int executionStartToCloseTimeoutSeconds) {
43
    this.executionStartToCloseTimeoutSeconds = executionStartToCloseTimeoutSeconds;
1✔
44
  }
1✔
45

46
  public ContinueAsNewWorkflowExecutionParameters withExecutionStartToCloseTimeoutSeconds(
47
      int executionStartToCloseTimeoutSeconds) {
48
    this.executionStartToCloseTimeoutSeconds = executionStartToCloseTimeoutSeconds;
×
49
    return this;
×
50
  }
51

52
  public ContinueAsNewWorkflowExecutionParameters withInput(byte[] input) {
53
    this.input = input;
×
54
    return this;
×
55
  }
56

57
  public byte[] getInput() {
58
    return input;
1✔
59
  }
60

61
  public void setInput(byte[] input) {
62
    this.input = input;
1✔
63
  }
1✔
64

65
  public String getTaskList() {
66
    return taskList;
1✔
67
  }
68

69
  public void setTaskList(String taskList) {
70
    this.taskList = taskList;
1✔
71
  }
1✔
72

73
  public ContinueAsNewWorkflowExecutionParameters withTaskList(String taskList) {
74
    this.taskList = taskList;
×
75
    return this;
×
76
  }
77

78
  public int getTaskStartToCloseTimeoutSeconds() {
79
    return taskStartToCloseTimeoutSeconds;
1✔
80
  }
81

82
  public void setTaskStartToCloseTimeoutSeconds(int taskStartToCloseTimeoutSeconds) {
83
    this.taskStartToCloseTimeoutSeconds = taskStartToCloseTimeoutSeconds;
1✔
84
  }
1✔
85

86
  public ContinueAsNewWorkflowExecutionParameters withTaskStartToCloseTimeoutSeconds(
87
      int taskStartToCloseTimeoutSeconds) {
88
    this.taskStartToCloseTimeoutSeconds = taskStartToCloseTimeoutSeconds;
×
89
    return this;
×
90
  }
91

92
  @Override
93
  public String toString() {
94
    StringBuilder sb = new StringBuilder();
×
95
    sb.append("{");
×
96
    sb.append("Input: " + new String(input, 0, 512, StandardCharsets.UTF_8) + ", ");
×
97
    sb.append("ExecutionStartToCloseTimeout: " + executionStartToCloseTimeoutSeconds + ", ");
×
98
    sb.append("TaskStartToCloseTimeout: " + taskStartToCloseTimeoutSeconds + ", ");
×
99
    sb.append("TaskList: " + taskList + ", ");
×
100
    sb.append("}");
×
101
    return sb.toString();
×
102
  }
103

104
  public ContinueAsNewWorkflowExecutionParameters copy() {
105
    ContinueAsNewWorkflowExecutionParameters result =
×
106
        new ContinueAsNewWorkflowExecutionParameters();
107
    result.setExecutionStartToCloseTimeoutSeconds(executionStartToCloseTimeoutSeconds);
×
108
    result.setInput(input);
×
109
    result.setTaskList(taskList);
×
110
    result.setTaskStartToCloseTimeoutSeconds(taskStartToCloseTimeoutSeconds);
×
111
    return result;
×
112
  }
113
}
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