Skip to content

Commit b30d6ca

Browse files
author
Sophia Tevosyan
committed
fixing the test build errors
1 parent 8377269 commit b30d6ca

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

client/src/test/java/com/microsoft/durabletask/DurableTaskGrpcClientFactoryTest.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
*/
1313
public class DurableTaskGrpcClientFactoryTest {
1414

15+
private static final String DEFAULT_VERSION = null;
16+
1517
@Test
1618
void getClient_samePort_returnsSameInstance() {
1719
// Arrange
1820
int port = 5001;
1921

2022
// Act
21-
DurableTaskClient client1 = DurableTaskGrpcClientFactory.getClient(port);
22-
DurableTaskClient client2 = DurableTaskGrpcClientFactory.getClient(port);
23+
DurableTaskClient client1 = DurableTaskGrpcClientFactory.getClient(port, DEFAULT_VERSION);
24+
DurableTaskClient client2 = DurableTaskGrpcClientFactory.getClient(port, DEFAULT_VERSION);
2325

2426
// Assert
2527
assertNotNull(client1, "First client should not be null");
@@ -34,8 +36,8 @@ void getClient_differentPorts_returnsDifferentInstances() {
3436
int port2 = 5003;
3537

3638
// Act
37-
DurableTaskClient client1 = DurableTaskGrpcClientFactory.getClient(port1);
38-
DurableTaskClient client2 = DurableTaskGrpcClientFactory.getClient(port2);
39+
DurableTaskClient client1 = DurableTaskGrpcClientFactory.getClient(port1, DEFAULT_VERSION);
40+
DurableTaskClient client2 = DurableTaskGrpcClientFactory.getClient(port2, DEFAULT_VERSION);
3941

4042
// Assert
4143
assertNotNull(client1, "Client for port1 should not be null");
@@ -51,14 +53,14 @@ void getClient_multiplePorts_maintainsCorrectMapping() {
5153
int port3 = 5006;
5254

5355
// Act
54-
DurableTaskClient client1 = DurableTaskGrpcClientFactory.getClient(port1);
55-
DurableTaskClient client2 = DurableTaskGrpcClientFactory.getClient(port2);
56-
DurableTaskClient client3 = DurableTaskGrpcClientFactory.getClient(port3);
57-
56+
DurableTaskClient client1 = DurableTaskGrpcClientFactory.getClient(port1, DEFAULT_VERSION);
57+
DurableTaskClient client2 = DurableTaskGrpcClientFactory.getClient(port2, DEFAULT_VERSION);
58+
DurableTaskClient client3 = DurableTaskGrpcClientFactory.getClient(port3, DEFAULT_VERSION);
59+
5860
// Request the same ports again
59-
DurableTaskClient client1Again = DurableTaskGrpcClientFactory.getClient(port1);
60-
DurableTaskClient client2Again = DurableTaskGrpcClientFactory.getClient(port2);
61-
DurableTaskClient client3Again = DurableTaskGrpcClientFactory.getClient(port3);
61+
DurableTaskClient client1Again = DurableTaskGrpcClientFactory.getClient(port1, DEFAULT_VERSION);
62+
DurableTaskClient client2Again = DurableTaskGrpcClientFactory.getClient(port2, DEFAULT_VERSION);
63+
DurableTaskClient client3Again = DurableTaskGrpcClientFactory.getClient(port3, DEFAULT_VERSION);
6264

6365
// Assert
6466
// Verify each port returns the same instance

0 commit comments

Comments
 (0)