kaijchen opened a new pull request, #3417:
URL: https://github.com/apache/ozone/pull/3417
## What changes were proposed in this pull request?
Migrate simple tests in hdds-server-scm to JUnit5, in which "simple" means
without `@Rule` and `@RunWith`.
Steps of the migration, each corresponding to one commit:
1. Run the following `sed` command against each file to substitute the class
names.
2. Fix errors mannually (5183e35ce8b30b9669b61e2c8e8c85c0f12fe03e).
3. Fix checkstyle (LineLength).
``` bash
sed -i $1 \
-e 's/org.junit.After;/org.junit.jupiter.api.AfterEach;/' \
-e 's/@After$/@AfterEach/' \
-e 's/org.junit.AfterClass;/org.junit.jupiter.api.AfterAll;/' \
-e 's/@AfterClass$/@AfterAll/' \
-e 's/org.junit.Before;/org.junit.jupiter.api.BeforeEach;/' \
-e 's/@Before$/@BeforeEach/' \
-e 's/org.junit.BeforeClass;/org.junit.jupiter.api.BeforeAll;/' \
-e 's/@BeforeClass$/@BeforeAll/' \
-e 's/org.junit.Test/org.junit.jupiter.api.Test/' \
-e 's/org.junit.Assert/org.junit.jupiter.api.Assertions/' \
-e 's/junit.framework.TestCase/org.junit.jupiter.api.Assertions/' \
-e 's/Assert\./Assertions./'
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6750
## How was this patch tested?
Full CI: https://github.com/kaijchen/ozone/actions/runs/2326163256
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]