Skip to content

Remove JUnit 4 usage from repository - #50442

Merged
Alan Zimmer (alzimmermsft) merged 8 commits into
mainfrom
MigrateJUnit4TestsToJUnit5
Sep 15, 2026
Merged

Alan Zimmer (alzimmermsft) merged 8 commits into
mainfrom
MigrateJUnit4TestsToJUnit5

Conversation

@alzimmermsft

Copy link
Copy Markdown
Member

Description

Removes usage of JUnit 4 from the repository.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@github-actions github-actions Bot added Azure SDK Tools Label for tracking issues related to Azure SDK Tools Azure.Identity Batch Cosmos Event Hubs Mgmt This issue is related to a management-plane library. Service Bus Track 1 labels Sep 14, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
31 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
31 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Migrates repository tests from JUnit 4 to JUnit 5 across legacy Azure SDK modules and updates related dependencies and fixtures.

Changes:

  • Replaces JUnit 4 annotations, assertions, assumptions, and expected-exception handling.
  • Updates Maven dependencies and test documentation.
  • Adds a JUnit 5 archetype fixture.
File summaries
File Description
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit5/goal.txt Updated as part of this pull request.
sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit5/archetype.properties Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/TopicSendReceiveTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/TestUtils.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/TestBase.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/SubscriptionClientTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/SessionTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/SendReceiveTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/security/AadTokenProviderTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/QueueSessionTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/QueueSendReceiveTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/ProxySelectorTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/primitives/UtilsTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/primitives/ConnectionStringBuilderTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/MessageBodyTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/management/ManagementClientProxyTest.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/ClientValidationTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/ClientTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/java/com/microsoft/azure/servicebus/ClientSessionTests.java Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/src/test/HowToRunTests.txt Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/README.md Updated as part of this pull request.
sdk/servicebus/microsoft-azure-servicebus/pom.xml Updated as part of this pull request.
sdk/resourcemanager/azure-resourcemanager/src/test/java/com/azure/resourcemanager/TestBatch.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/WebSocketsSendTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/WebSocketsReceiveTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/SetPrefetchCountTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/SasTokenSendTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/SasTokenReceiveTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/RequestResponseTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/ReceiveTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/ReceiverRuntimeMetricsTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/ReceiverIdentifierTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/ReceivePumpTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/ReceivePumpEventHubTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/ReceiveParallelManualTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/MsalTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/ManagedIdentityTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/EventDataBatchAPITest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/AdalTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/sendrecv/AadBase.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/proxy/ProxySendTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/proxy/ProxySendLargeMessageTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/proxy/ProxySelectorTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/proxy/ProxyReceiveTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/proxy/ProxyIntegrationTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/proxy/ProxyConfigurationTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/lib/SasTokenTestBase.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/lib/ApiTestBase.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/impl/WebSocketProxyConnectionHandlerTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/impl/SendTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/impl/EventDataOrderTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/WebSocketsSendLargeMessageTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/SendLargeMessageTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/SecurityExceptionsTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/RetryPolicyTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/ReceiverEpochTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/ReactorFaultTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/MsgFactoryOpenCloseTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/exceptioncontracts/ClientEntityCreateTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/eventdata/InteropEventBodyTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/eventdata/InteropAmqpPropertiesTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/eventdata/EventDataTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/eventdata/EventDataBatchTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/eventdata/BackCompatTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/connstrbuilder/TransportTypeTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/connstrbuilder/ConnStrBuilderTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/concurrency/EventHubClientTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/src/test/java/com/microsoft/azure/eventhubs/concurrency/ConcurrentReceiversTest.java Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/README.md Updated as part of this pull request.
sdk/eventhubs/microsoft-azure-eventhubs/pom.xml Updated as part of this pull request.
sdk/e2e/src/test/java/com/azure/endtoend/identity/ManagedIdentityCredentialLiveTest.java Updated as part of this pull request.
sdk/e2e/pom.xml Updated as part of this pull request.
sdk/cosmos/azure-cosmos-kafka-connect/src/test/java/com/azure/cosmos/kafka/connect/implementation/sink/idStrategy/TemplateStrategyTest.java Updated as part of this pull request.
sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/TaskTests.java Updated as part of this pull request.
sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/JobTests.java Updated as part of this pull request.
sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/JobScheduleTests.java Updated as part of this pull request.
sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/FileTests.java Updated as part of this pull request.
sdk/batch/microsoft-azure-batch/src/test/java/com/microsoft/azure/batch/BatchIntegrationTestBase.java Updated as part of this pull request.
sdk/batch/microsoft-azure-batch/pom.xml Updated as part of this pull request.
eng/versioning/external_dependencies.txt Updated as part of this pull request.
Review details
  • Files reviewed: 84/84 changed files
  • Comments generated: 4
  • Review effort level: Lite

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread sdk/e2e/pom.xml Outdated
Comment thread sdk/tools/azure-sdk-archetype/src/test/resources/projects/junit5/goal.txt Outdated

@vcolin7 vcolin7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@alzimmermsft
Alan Zimmer (alzimmermsft) merged commit 5595c0c into main Sep 15, 2026
99 of 104 checks passed
@alzimmermsft
Alan Zimmer (alzimmermsft) deleted the MigrateJUnit4TestsToJUnit5 branch September 15, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Azure.Identity Azure SDK Tools Label for tracking issues related to Azure SDK Tools Batch Cosmos Event Hubs Mgmt This issue is related to a management-plane library. Service Bus Track 1

Projects

Development

Successfully merging this pull request may close these issues.

3 participants