Skip to content

Commit dbd99dd

Browse files
committed
Prevent garbage collection if junit.jupiter.api.TestFactory annotations are present
1 parent 49bf096 commit dbd99dd

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

jvm/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
## [Unreleased]
1414
### Fixed
1515
- Restore support for JRE 11. (fixes [#528](https://github.com/diffplug/selfie/issues/528))
16+
- snapshots created by `junit.jupiter.api.TestFactory` are no longer garbage-collected (#534)
1617

1718
## [2.5.2] - 2025-04-28
1819
### Fixed

jvm/selfie-runner-junit5/src/main/kotlin/com/diffplug/selfie/junit5/SelfieGC.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023-2024 DiffPlug
2+
* Copyright (C) 2023-2025 DiffPlug
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ import com.diffplug.selfie.guts.WithinTestGC
2222
private val testAnnotations =
2323
listOf(
2424
"org.junit.jupiter.api.Test", // junit5,
25+
"org.junit.jupiter.api.TestFactory", // junit5,
2526
"org.junit.jupiter.params.ParameterizedTest",
2627
"org.junit.Test" // junit4
2728
)

0 commit comments

Comments
 (0)