Skip to content
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

[pekko-testkit-typed] Support for Junit5 #445

Closed
wants to merge 72 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
9e68f05
junit5 extension and tests
Jun 21, 2023
2e6ae54
cleanup merge residuals in Dependencies.scala
Jun 21, 2023
d895234
added config value for test
Jun 21, 2023
7e6a230
changed junit5 version to 5.9.3
Jun 21, 2023
07ae196
added results of scalafmt run
Jun 21, 2023
b7e06ee
removed unnecessary license header
Jun 21, 2023
3a96f71
added class copy notice
Jun 21, 2023
367ec78
deleted unnecessary import
Jun 22, 2023
9f0a81a
scalafmt reformat
Jun 22, 2023
b8c83b6
scalafmt reformat
Jun 22, 2023
b1c7d1a
Merge branch 'apache:main' into junit5-extension
thmue Jun 22, 2023
449b041
scalafmt reformat
Jun 24, 2023
fb1a88a
scalafmt reformat
Jun 26, 2023
f07bd69
recreate headers
Jun 26, 2023
a07a0e1
replaced headers
Jun 26, 2023
ef1ec63
replaced 2.13 list handling with ccoompat to support 2.12/2.13
Jun 26, 2023
cccc892
added error handling if annotated field is missing
Jun 26, 2023
3046170
moved annotation to java package
Jun 28, 2023
d9b3142
simplified code
Jul 2, 2023
d9a2ca0
updated headers
Jul 3, 2023
85c0df1
updated headers to full ASF header lic
Jul 3, 2023
761bdae
Merge branch 'apache:main' into junit5-extension
thmue Oct 14, 2023
2ae605d
updated deps, changed case class to class, aligned imports
Oct 14, 2023
b882379
reverted change
Oct 14, 2023
57d6421
formating javafmtCheck
Oct 14, 2023
0b3dc44
Update sbt-scalafix to 0.11.1 (#709)
scala-steward-asf[bot] Oct 15, 2023
3101167
Update sbt-dynver to 5.0.1 (#711)
scala-steward-asf[bot] Oct 15, 2023
fa0a509
Update sbt-license-report to 1.6.1 (#716)
scala-steward-asf[bot] Oct 15, 2023
3d47f05
Update gson to 2.10.1 (#717)
scala-steward-asf[bot] Oct 15, 2023
77ff42d
Update logback-classic to 1.2.12 (#710)
scala-steward-asf[bot] Oct 15, 2023
e72dfa5
Update lmdbjava to 0.8.3 (#731)
scala-steward-asf[bot] Oct 15, 2023
567c4b6
Update sbt-jmh to 0.4.6 (#734)
scala-steward-asf[bot] Oct 15, 2023
6d25bb0
Update jctools-core to 4.0.1 (#730)
scala-steward-asf[bot] Oct 15, 2023
a8d8ece
Update commons-compress to 1.24.0 (#728)
scala-steward-asf[bot] Oct 15, 2023
279ec93
Update bcpkix-jdk15on to 1.70 (#729)
scala-steward-asf[bot] Oct 15, 2023
21bb4dd
Update metrics-core, metrics-jvm to 4.2.21 (#726)
scala-steward-asf[bot] Oct 15, 2023
69e192b
Update commons-io to 2.14.0 (#725)
scala-steward-asf[bot] Oct 15, 2023
45d6b7d
Update asn-one to 0.6.0 (#719)
scala-steward-asf[bot] Oct 15, 2023
2615e35
Update jimfs to 1.3.0 (#718)
scala-steward-asf[bot] Oct 15, 2023
49f2f07
Update commons-codec to 1.16.0 (#724)
scala-steward-asf[bot] Oct 15, 2023
ddb4909
Sidestep reproducibility issue (#708)
raboof Oct 15, 2023
955b622
scalatest 3.2.17 (#735)
pjfanning Oct 15, 2023
5314dcf
use bcpkix-jdk18on (jdk15on no longer published)
pjfanning Oct 15, 2023
a603d47
Update sigar-loader to 1.6.6 (#727)
scala-steward-asf[bot] Oct 16, 2023
a99dbda
=sbt Update sbt-welcome to 0.3.2
He-Pin Oct 16, 2023
2e19bf1
Add more ignored dependencies to .scala-steward.conf
mdedetrich Oct 16, 2023
a5899c7
on each PR, do a full local publish (#691)
pjfanning Oct 16, 2023
a0811b2
junit5 extension and tests
Jun 21, 2023
e656dd3
cleanup merge residuals in Dependencies.scala
Jun 21, 2023
51d1fb5
added config value for test
Jun 21, 2023
478ff7d
changed junit5 version to 5.9.3
Jun 21, 2023
92e8cc3
added results of scalafmt run
Jun 21, 2023
7478787
removed unnecessary license header
Jun 21, 2023
3e94070
added class copy notice
Jun 21, 2023
0ac3496
deleted unnecessary import
Jun 22, 2023
691706a
scalafmt reformat
Jun 22, 2023
e756455
scalafmt reformat
Jun 22, 2023
9d91038
scalafmt reformat
Jun 24, 2023
c71034c
scalafmt reformat
Jun 26, 2023
46a1f74
recreate headers
Jun 26, 2023
448c927
replaced headers
Jun 26, 2023
656feb5
replaced 2.13 list handling with ccoompat to support 2.12/2.13
Jun 26, 2023
3786acb
added error handling if annotated field is missing
Jun 26, 2023
aa9ae7a
moved annotation to java package
Jun 28, 2023
fb9c333
simplified code
Jul 2, 2023
cd923da
updated headers
Jul 3, 2023
dace911
updated headers to full ASF header lic
Jul 3, 2023
9eed963
updated deps, changed case class to class, aligned imports
Oct 14, 2023
e421ef4
reverted change
Oct 14, 2023
b05b40f
formating javafmtCheck
Oct 14, 2023
e717dec
rebased
Oct 16, 2023
58ae5da
Merge remote-tracking branch 'origin/junit5-extension' into junit5-ex…
Oct 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ package org.apache.pekko.actor.testkit.typed.javadsl

import org.junit.jupiter.api.extension.{ AfterAllCallback, BeforeTestExecutionCallback, ExtensionContext }
import org.junit.platform.commons.support.AnnotationSupport

import scala.jdk.CollectionConverters.CollectionHasAsScala
import org.apache.pekko
import pekko.util.ccompat.JavaConverters.CollectionHasAsScala

final class TestKitJunit5Extension() extends AfterAllCallback with BeforeTestExecutionCallback {

Expand All @@ -23,7 +23,7 @@ final class TestKitJunit5Extension() extends AfterAllCallback with BeforeTestExe
*/
override def beforeTestExecution(context: ExtensionContext): Unit = {

context.getTestInstance.ifPresent(instance => {
context.getTestInstance.ifPresent((instance: AnyRef) => {
val fielValue = AnnotationSupport.findAnnotatedFieldValues(instance, classOf[Junit5TestKit]).asScala.toList.head
pjfanning marked this conversation as resolved.
Show resolved Hide resolved
testKit = Some(fielValue.asInstanceOf[ActorTestKit])
})
Expand Down