Skip to content

Commit aa5cb41

Browse files
Fix workflow options equality (#1868)
1 parent 456da32 commit aa5cb41

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

temporal-sdk/src/main/java/io/temporal/worker/WorkerOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ && compare(that.maxTaskQueueActivitiesPerSecond, maxTaskQueueActivitiesPerSecond
579579
&& Objects.equals(stickyQueueScheduleToStartTimeout, that.stickyQueueScheduleToStartTimeout)
580580
&& disableEagerExecution == that.disableEagerExecution
581581
&& useBuildIdForVersioning == that.useBuildIdForVersioning
582-
&& buildId.equals(that.buildId);
582+
&& Objects.equals(that.buildId, buildId);
583583
}
584584

585585
@Override

temporal-sdk/src/test/java/io/temporal/worker/WorkerOptionsTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,11 @@ private void verifyBuild(WorkerOptions options) {
4040
assertEquals(10, options.getMaxConcurrentActivityExecutionSize());
4141
assertEquals(11, options.getMaxConcurrentLocalActivityExecutionSize());
4242
}
43+
44+
@Test
45+
public void verifyWorkerOptionsEquality() {
46+
WorkerOptions w1 = WorkerOptions.newBuilder().build();
47+
WorkerOptions w2 = WorkerOptions.newBuilder().build();
48+
assertEquals(w1, w2);
49+
}
4350
}

0 commit comments

Comments
 (0)