the exception thrown when more than one candidate bean names for SpykBean were found didn't align with the one thrown by Spring Boot's native Mockito support. Now it does. See #100
4.0.1
fix #97: memory leak in com.ninjasquad.springmockk.MockkClear. In projects where many different Spring contextx are created during tests, even though the Spring test context caches ends up destroying old ones, SpringMockK retained references to mocks, themselves retaining references to the Spring context, and leading to high memory usage. SpringMockK now uses weak references in order to not prevent the garbage collector to collect those mocks if they're only referenced by SpringMockK, for clearing purposes.
4.0.0
SpringMockK 4.0.0 is built against Spring Boot 3, with Java 17, and MockK 1.13.3.
Spying JDK proxies with Java 17 requires to pass a specific option to the JVM. See the README for details.
Important note: MockKs artifact ID has been modified from mockk to mockk-jvm. If you specify a specific version for MockK in your build rather than relying on SpringMockK's transitive dependency, make sure to use the new arctifact ID.
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Bumps springmockk from 3.1.2 to 4.0.2.
Release notes
Sourced from springmockk's releases.
Commits
dcbe643
chore: prepare release 4.0.29c78b77
fix: align behavior with Spring Boot when no bean name for spy found2c4a23d
chore: prepare release 4.0.1ccc87da
fix: avoid retaining mocks in memory8c9c9b7
ci: use Java 17 on CIc35f18d
chore: upgrade to Spring Boot 3.0.0, Kotlin 1.7.21846e12a
chore: upgrade to Java 17You can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)