• 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

69.32
/src/main/java/com/uber/cadence/internal/replay/StartChildWorkflowExecutionParameters.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 com.uber.cadence.ParentClosePolicy;
21
import com.uber.cadence.WorkflowIdReusePolicy;
22
import com.uber.cadence.WorkflowType;
23
import com.uber.cadence.internal.common.RetryParameters;
24
import java.util.Arrays;
25
import java.util.Map;
26
import java.util.Objects;
27

28
public final class StartChildWorkflowExecutionParameters {
29

30
  public static final class Builder {
1✔
31

32
    private String domain;
33

34
    private String control;
35

36
    private long executionStartToCloseTimeoutSeconds;
37

38
    private byte[] input;
39

40
    private String taskList;
41

42
    private long taskStartToCloseTimeoutSeconds;
43

44
    private String workflowId;
45

46
    private WorkflowType workflowType;
47

48
    private WorkflowIdReusePolicy workflowIdReusePolicy;
49

50
    private RetryParameters retryParameters;
51

52
    private String cronSchedule;
53

54
    private Map<String, Object> memo;
55

56
    private Map<String, Object> searchAttributes;
57

58
    private Map<String, byte[]> context;
59

60
    private ParentClosePolicy parentClosePolicy;
61

62
    public Builder setDomain(String domain) {
63
      this.domain = domain;
1✔
64
      return this;
1✔
65
    }
66

67
    public Builder setControl(String control) {
UNCOV
68
      this.control = control;
×
UNCOV
69
      return this;
×
70
    }
71

72
    public Builder setExecutionStartToCloseTimeoutSeconds(
73
        long executionStartToCloseTimeoutSeconds) {
74
      this.executionStartToCloseTimeoutSeconds = executionStartToCloseTimeoutSeconds;
1✔
75
      return this;
1✔
76
    }
77

78
    public Builder setInput(byte[] input) {
79
      this.input = input;
1✔
80
      return this;
1✔
81
    }
82

83
    public Builder setTaskList(String taskList) {
84
      this.taskList = taskList;
1✔
85
      return this;
1✔
86
    }
87

88
    public Builder setTaskStartToCloseTimeoutSeconds(long taskStartToCloseTimeoutSeconds) {
89
      this.taskStartToCloseTimeoutSeconds = taskStartToCloseTimeoutSeconds;
1✔
90
      return this;
1✔
91
    }
92

93
    public Builder setWorkflowId(String workflowId) {
94
      this.workflowId = workflowId;
1✔
95
      return this;
1✔
96
    }
97

98
    public Builder setWorkflowType(WorkflowType workflowType) {
99
      this.workflowType = workflowType;
1✔
100
      return this;
1✔
101
    }
102

103
    public Builder setWorkflowIdReusePolicy(WorkflowIdReusePolicy workflowIdReusePolicy) {
104
      this.workflowIdReusePolicy = workflowIdReusePolicy;
1✔
105
      return this;
1✔
106
    }
107

108
    public Builder setRetryParameters(RetryParameters retryParameters) {
109
      this.retryParameters = retryParameters;
1✔
110
      return this;
1✔
111
    }
112

113
    public Builder setCronSchedule(String cronSchedule) {
114
      this.cronSchedule = cronSchedule;
1✔
115
      return this;
1✔
116
    }
117

118
    public Builder setMemo(Map<String, Object> memo) {
119
      this.memo = memo;
1✔
120
      return this;
1✔
121
    }
122

123
    public Builder setSearchAttributes(Map<String, Object> searchAttributes) {
124
      this.searchAttributes = searchAttributes;
1✔
125
      return this;
1✔
126
    }
127

128
    public Builder setContext(Map<String, byte[]> context) {
129
      this.context = context;
1✔
130
      return this;
1✔
131
    }
132

133
    public Builder setParentClosePolicy(ParentClosePolicy parentClosePolicy) {
134
      this.parentClosePolicy = parentClosePolicy;
1✔
135
      return this;
1✔
136
    }
137

138
    public StartChildWorkflowExecutionParameters build() {
139
      return new StartChildWorkflowExecutionParameters(
1✔
140
          domain,
141
          input,
142
          control,
143
          executionStartToCloseTimeoutSeconds,
144
          taskList,
145
          taskStartToCloseTimeoutSeconds,
146
          workflowId,
147
          workflowType,
148
          workflowIdReusePolicy,
149
          retryParameters,
150
          cronSchedule,
151
          memo,
152
          searchAttributes,
153
          context,
154
          parentClosePolicy);
155
    }
156
  }
157

158
  private final String domain;
159

160
  private final String control;
161

162
  private final long executionStartToCloseTimeoutSeconds;
163

164
  private final byte[] input;
165

166
  private final String taskList;
167

168
  private final long taskStartToCloseTimeoutSeconds;
169

170
  private final String workflowId;
171

172
  private final WorkflowType workflowType;
173

174
  private final WorkflowIdReusePolicy workflowIdReusePolicy;
175

176
  private final RetryParameters retryParameters;
177

178
  private final String cronSchedule;
179

180
  private Map<String, Object> memo;
181

182
  private Map<String, Object> searchAttributes;
183

184
  private Map<String, byte[]> context;
185

186
  private final ParentClosePolicy parentClosePolicy;
187

188
  private StartChildWorkflowExecutionParameters(
189
      String domain,
190
      byte[] input,
191
      String control,
192
      long executionStartToCloseTimeoutSeconds,
193
      String taskList,
194
      long taskStartToCloseTimeoutSeconds,
195
      String workflowId,
196
      WorkflowType workflowType,
197
      WorkflowIdReusePolicy workflowIdReusePolicy,
198
      RetryParameters retryParameters,
199
      String cronSchedule,
200
      Map<String, Object> memo,
201
      Map<String, Object> searchAttributes,
202
      Map<String, byte[]> context,
203
      ParentClosePolicy parentClosePolicy) {
1✔
204
    this.domain = domain;
1✔
205
    this.input = input;
1✔
206
    this.control = control;
1✔
207
    this.executionStartToCloseTimeoutSeconds = executionStartToCloseTimeoutSeconds;
1✔
208
    this.taskList = taskList;
1✔
209
    this.taskStartToCloseTimeoutSeconds = taskStartToCloseTimeoutSeconds;
1✔
210
    this.workflowId = workflowId;
1✔
211
    this.workflowType = workflowType;
1✔
212
    this.workflowIdReusePolicy = workflowIdReusePolicy;
1✔
213
    this.retryParameters = retryParameters;
1✔
214
    this.cronSchedule = cronSchedule;
1✔
215
    this.memo = memo;
1✔
216
    this.searchAttributes = searchAttributes;
1✔
217
    this.context = context;
1✔
218
    this.parentClosePolicy = parentClosePolicy;
1✔
219
  }
1✔
220

221
  public String getDomain() {
222
    return domain;
1✔
223
  }
224

225
  public String getControl() {
UNCOV
226
    return control;
×
227
  }
228

229
  public long getExecutionStartToCloseTimeoutSeconds() {
230
    return executionStartToCloseTimeoutSeconds;
1✔
231
  }
232

233
  public byte[] getInput() {
234
    return input;
1✔
235
  }
236

237
  public String getTaskList() {
238
    return taskList;
1✔
239
  }
240

241
  public long getTaskStartToCloseTimeoutSeconds() {
242
    return taskStartToCloseTimeoutSeconds;
1✔
243
  }
244

245
  public String getWorkflowId() {
246
    return workflowId;
1✔
247
  }
248

249
  public WorkflowType getWorkflowType() {
250
    return workflowType;
1✔
251
  }
252

253
  public WorkflowIdReusePolicy getWorkflowIdReusePolicy() {
254
    return workflowIdReusePolicy;
1✔
255
  }
256

257
  public RetryParameters getRetryParameters() {
258
    return retryParameters;
1✔
259
  }
260

261
  public String getCronSchedule() {
262
    return cronSchedule;
1✔
263
  }
264

265
  public Map<String, Object> getMemo() {
266
    return memo;
1✔
267
  }
268

269
  public Map<String, Object> getSearchAttributes() {
270
    return searchAttributes;
1✔
271
  }
272

273
  public Map<String, byte[]> getContext() {
274
    return context;
1✔
275
  }
276

277
  public ParentClosePolicy getParentClosePolicy() {
278
    return parentClosePolicy;
1✔
279
  }
280

281
  @Override
282
  public boolean equals(Object o) {
UNCOV
283
    if (this == o) return true;
×
UNCOV
284
    if (o == null || getClass() != o.getClass()) return false;
×
UNCOV
285
    StartChildWorkflowExecutionParameters that = (StartChildWorkflowExecutionParameters) o;
×
UNCOV
286
    return executionStartToCloseTimeoutSeconds == that.executionStartToCloseTimeoutSeconds
×
287
        && taskStartToCloseTimeoutSeconds == that.taskStartToCloseTimeoutSeconds
UNCOV
288
        && Objects.equals(domain, that.domain)
×
UNCOV
289
        && Objects.equals(control, that.control)
×
UNCOV
290
        && Arrays.equals(input, that.input)
×
UNCOV
291
        && Objects.equals(taskList, that.taskList)
×
UNCOV
292
        && Objects.equals(workflowId, that.workflowId)
×
UNCOV
293
        && Objects.equals(workflowType, that.workflowType)
×
294
        && workflowIdReusePolicy == that.workflowIdReusePolicy
UNCOV
295
        && Objects.equals(retryParameters, that.retryParameters)
×
UNCOV
296
        && Objects.equals(cronSchedule, that.cronSchedule)
×
UNCOV
297
        && Objects.equals(memo, that.memo)
×
UNCOV
298
        && Objects.equals(searchAttributes, that.searchAttributes)
×
UNCOV
299
        && Objects.equals(context, that.context)
×
UNCOV
300
        && Objects.equals(parentClosePolicy, that.parentClosePolicy);
×
301
  }
302

303
  @Override
304
  public int hashCode() {
UNCOV
305
    int result =
×
UNCOV
306
        Objects.hash(
×
307
            domain,
308
            control,
UNCOV
309
            executionStartToCloseTimeoutSeconds,
×
310
            taskList,
UNCOV
311
            taskStartToCloseTimeoutSeconds,
×
312
            workflowId,
313
            workflowType,
314
            workflowIdReusePolicy,
315
            retryParameters,
316
            cronSchedule,
317
            memo,
318
            searchAttributes,
319
            context,
320
            parentClosePolicy);
UNCOV
321
    result = 31 * result + Arrays.hashCode(input);
×
UNCOV
322
    return result;
×
323
  }
324

325
  @Override
326
  public String toString() {
UNCOV
327
    return "StartChildWorkflowExecutionParameters{"
×
328
        + "domain='"
329
        + domain
330
        + '\''
331
        + ", control='"
332
        + control
333
        + '\''
334
        + ", executionStartToCloseTimeoutSeconds="
335
        + executionStartToCloseTimeoutSeconds
336
        + ", input="
UNCOV
337
        + Arrays.toString(input)
×
338
        + ", taskList='"
339
        + taskList
340
        + '\''
341
        + ", taskStartToCloseTimeoutSeconds="
342
        + taskStartToCloseTimeoutSeconds
343
        + ", workflowId='"
344
        + workflowId
345
        + '\''
346
        + ", workflowType="
347
        + workflowType
348
        + ", workflowIdReusePolicy="
349
        + workflowIdReusePolicy
350
        + ", retryParameters="
351
        + retryParameters
352
        + ", cronSchedule="
353
        + cronSchedule
354
        + ", memo="
355
        + memo
356
        + ", searchAttributes="
357
        + searchAttributes
358
        + ", context='"
359
        + context
360
        + ", parentClosePolicy="
361
        + parentClosePolicy
362
        + '}';
363
  }
364
}
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