Skip to content

Refactoring Test Code to Reduce Duplication of Mock Object Creation for Issue#14768 #15256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 137 commits into from

Conversation

gzhao9
Copy link

@gzhao9 gzhao9 commented Jun 15, 2024

Hi there,

This PR is to address issue #14768, which involves reducing repeated mock object creation in tests.

Although my issue submission mentioned 4 separate draft PRs, I combined them into this PR, since they all address the same problem.

If you prefer these changes to be split into separate PRs, please let me know, and I will gladly close this PR and submit individual ones.

@pivotal-cla
Copy link

@gzhao9 Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 15, 2024
@pivotal-cla
Copy link

@gzhao9 Thank you for signing the Contributor License Agreement!

@jzheaux
Copy link
Contributor

jzheaux commented Jun 24, 2024

Hi, @gzhao9. Will you please squash your commits so that there are only 4 in the PR?

@gzhao9 gzhao9 force-pushed the refactor-for-issue#14768 branch from 61665bb to 17e09f9 Compare June 25, 2024 03:49
@gzhao9
Copy link
Author

gzhao9 commented Jun 25, 2024

Hi, @gzhao9. Will you please squash your commits so that there are only 4 in the PR?

I've squashed it and only have 4 commits, which correspond to the 4 examples I mentioned in issue #14768.

marcusdacoregio and others added 19 commits June 26, 2024 14:03
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.10.2 to 5.10.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.10.2...r5.10.3)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.10.2 to 5.10.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.10.2...r5.10.3)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.10.2 to 5.10.3.
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](junit-team/junit5@r5.10.2...r5.10.3)

---
updated-dependencies:
- dependency-name: org.junit:junit-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
dependabot bot and others added 27 commits July 9, 2024 21:08
Bumps [io.projectreactor:reactor-bom](https://github.com/reactor/reactor) from 2023.0.7 to 2023.0.8.
- [Release notes](https://github.com/reactor/reactor/releases)
- [Commits](reactor/reactor@2023.0.7...2023.0.8)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.projectreactor:reactor-bom](https://github.com/reactor/reactor) from 2023.0.7 to 2023.0.8.
- [Release notes](https://github.com/reactor/reactor/releases)
- [Commits](reactor/reactor@2023.0.7...2023.0.8)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.projectreactor.netty:reactor-netty](https://github.com/reactor/reactor-netty) from 1.0.46 to 1.0.47.
- [Release notes](https://github.com/reactor/reactor-netty/releases)
- [Commits](reactor/reactor-netty@v1.0.46...v1.0.47)

---
updated-dependencies:
- dependency-name: io.projectreactor.netty:reactor-netty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [io.projectreactor:reactor-bom](https://github.com/reactor/reactor) from 2020.0.45 to 2020.0.46.
- [Release notes](https://github.com/reactor/reactor/releases)
- [Commits](reactor/reactor@2020.0.45...2020.0.46)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…ctiveDirectoryLdapAuthenticationProviderTests.java
…rg.springframework.security.authorization.method
@gzhao9 gzhao9 closed this Jul 11, 2024
@gzhao9
Copy link
Author

gzhao9 commented Jul 11, 2024

I encountered a problem while trying to rebase and update to the latest main. I mistakenly closed the PR and then discovered that I do not have permission to reopen it, receiving the message this branch was force pushed or recreated. What should I do in this situation? Should I create a new PR, or can an administrator reopen it? @jzheaux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.