Remove or rewrite commented-out tests (OrderComponentTest, GatewayControllerTest)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 62/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- docker, java, mongodb, spring-boot
- Domain
- testing-qa
Research direction
Start with order-service's commented-out OrderComponentTest and customer-service's CustomerComponentTest as the model to copy from. The gateway-service GatewayControllerTest is a manual load script, so decide whether to delete it or move it out of src/test. Done means OrderComponentTest runs with @SpringBootTest(RANDOM_PORT), a Testcontainers MongoDB, and covers testAccept and testPrepare, and the gateway test no longer sits in the test sources.
Written by the indexing model from the issue text.
Description
Problem
order-service:OrderComponentTestis entirely commented out and based on JUnit 4 (SpringRunner,HoverflyRule,@ClassRule). order-service therefore has no component test, unlike account-service and customer-service.gateway-service:GatewayControllerTesthas its@Testcommented out; it is a manual load script that sends 100 orders tolocalhost:8080.
Suggested solution
- Rewrite
OrderComponentTestin the style ofCustomerComponentTest(@SpringBootTest(RANDOM_PORT), Testcontainers MongoDB with@ServiceConnection,@ExtendWith(HoverflyExtension.class)), coveringtestAcceptandtestPrepare. - Remove
GatewayControllerTestfromsrc/test(or move the load generator outside the test sources) if it is not meant to run.
- Dominant language
- Java
- Stars
- 12
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from piomin/sample-spring-cloud-testing
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 62/100
-
bug
Difficulty 3/5 Half a day Newbie friendliness 62/100
All issues in piomin/sample-spring-cloud-testing
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
a2aproject/a2a-java#1275 ·
Maintainers usually reply within 1 day
-
module/ftp Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ballerina-platform/ballerina-library#9476 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anwilli5/coin-collection-android-US#515 ·
Maintainers usually reply within 1 day
-
status: waiting-for-triage type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
spring-projects/spring-integration#11654 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Under an hour Newbie friendliness 70/100
Vakore/ZappierGames#248 ·