Skip to content

Add unit tests for DurableTaskGrpcClientFactory#257

Merged
sophiatev merged 3 commits intostevosyan/add-grpc-client-factoryfrom
copilot/sub-pr-256
Jan 28, 2026
Merged

Add unit tests for DurableTaskGrpcClientFactory#257
sophiatev merged 3 commits intostevosyan/add-grpc-client-factoryfrom
copilot/sub-pr-256

Conversation

Copy link
Contributor

Copilot AI commented Jan 28, 2026

Issue describing the changes in this PR

resolves #254

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Added unit tests validating DurableTaskGrpcClientFactory singleton behavior:

  • Same port returns same client instance
  • Different ports return different client instances
  • Multiple concurrent ports maintain correct mappings

This PR only adds the test file and does not modify any production code.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…rror

Co-authored-by: sophiatev <38052607+sophiatev@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 28, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/microsoft/durabletask-protobuf/commits
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (http block)
  • rt.services.visualstudio.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add DurableTaskGrpcClientFactory Add unit tests for DurableTaskGrpcClientFactory Jan 28, 2026
Copilot AI requested a review from sophiatev January 28, 2026 07:35
@sophiatev
Copy link
Contributor

sophiatev commented Jan 28, 2026

@copilot remove the changes to the proto file and DurableTaskGrpcClient.java from this PR. Only keep the new test file.

…y test file

Co-authored-by: sophiatev <38052607+sophiatev@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 28, 2026

@copilot remove the changes to the proto file and DurableTaskGrpcClient.java from this PR. Only keep the new test file.

Removed changes to DurableTaskGrpcClient.java and orchestrator_service.proto in commit e87e98f. Only the test file DurableTaskGrpcClientFactoryTest.java remains.

Note: The base branch has a compilation error where defaultVersion is not initialized in the DurableTaskGrpcClient(int port) constructor. This was one of the changes I previously made and has now been reverted per your request.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • rt.services.visualstudio.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED --add-opens java.base/java.nio.charset=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=256m (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@sophiatev sophiatev marked this pull request as ready for review January 28, 2026 21:13
@sophiatev sophiatev requested a review from a team as a code owner January 28, 2026 21:13
@sophiatev sophiatev merged commit 8377269 into stevosyan/add-grpc-client-factory Jan 28, 2026
1 check passed
@sophiatev sophiatev deleted the copilot/sub-pr-256 branch January 28, 2026 21:13
sophiatev added a commit that referenced this pull request Jan 30, 2026
* starting new release

* removed preview flag

* first commit

* fixing the build error

* fixing the build error

* Update azurefunctions/src/main/java/com/microsoft/durabletask/azurefunctions/DurableClientContext.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* copilot comments

* fixing the build errors

* Add unit tests for DurableTaskGrpcClientFactory (#257)

* Initial plan

* Add unit tests for DurableTaskGrpcClientFactory and fix compilation error

Co-authored-by: sophiatev <38052607+sophiatev@users.noreply.github.com>

* Remove changes to DurableTaskGrpcClient.java and proto file, keep only test file

Co-authored-by: sophiatev <38052607+sophiatev@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sophiatev <38052607+sophiatev@users.noreply.github.com>

* fixing the test build errors

---------

Co-authored-by: Sophia Tevosyan <stevosyan@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants