Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Dynamically replace DITEL with AotDependencyInjectionTestExecutionListener #1264

Closed
1 task done
sbrannen opened this issue Nov 16, 2021 · 1 comment · Fixed by #1265
Closed
1 task done

Dynamically replace DITEL with AotDependencyInjectionTestExecutionListener #1264

sbrannen opened this issue Nov 16, 2021 · 1 comment · Fixed by #1265
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@sbrannen
Copy link
Contributor

sbrannen commented Nov 16, 2021

Overview

This is a follow up to #1258.

Deliverables

  • Dynamically replace the standard DependencyInjectionTestExecutionListener with the AotDependencyInjectionTestExecutionListener
@sbrannen
Copy link
Contributor Author

Current work on this issue can be viewed in the following feature branch.

main...sbrannen:issues/gh-1264-revise-AOT-DITEL

@sbrannen sbrannen changed the title Only register AotDependencyInjectionTestExecutionListener if necessary Dynamically replace DITEL with AotDependencyInjectionTestExecutionListener Nov 16, 2021
sbrannen added a commit to sbrannen/spring-native that referenced this issue Nov 16, 2021
See spring-atticgh-1264

GraalVM: GraalVM 21.3.0 Java 11 CE (Java Version 11.0.13+7-jvmci-21.3-b05)
Date           Sample             Build Time (s)  Build Mem (GB)  RSS Mem (M)  Image Size (M)  Startup Time (s)  JVM Uptime (s)   ReflectConfig (lines)
20211116-1942  commandlinerunner  41.8            4.96            21.4         23.4            0.016             0.021           640
20211116-1944  webflux-netty      83.3            6.64            42.8         56.9            0.047             0.049           2346
20211116-1945  webmvc-tomcat      80.4            6.44            47.4         53.6            0.068             0.07            2410
20211116-1947  webflux-thymeleaf  93.4            7.16            51.1         60.9            0.044             0.045           2655
20211116-1952  grpc               48.6            5.26            26.5         26.0                                              360
20211116-1954  jdbc-tx            99.5            5.84            61.4         64.5            0.066             0.069           2964
20211116-1956  class-proxies-aop  90.7            6.20            59.0         62.3            0.074             0.077           2535
20211116-1958  batch              85.4            5.69            62.2         52.0            0.055             0.057           1693
sbrannen added a commit to sbrannen/spring-native that referenced this issue Nov 16, 2021
…tener

Prior to this commit, the AotDependencyInjectionTestExecutionListener
(AOT_DITEL) was registered via spring.factories. In addition, the
AOT_DITEL was registered immediately before the standard
DependencyInjectionTestExecutionListener (DITEL), based on their
respective orders 1999 and 2000.

With this commit, the AOT_DITEL now extends DITEL and is registered
programmatically via the TestExecutionListenerFactoriesCodeContributor
to replace the DITEL registered via spring.factories in spring-test. In
addition, AOT_DITEL delegates to the standard behavior in DITEL if the
current test class is not supported via an AOT generated application
context, thereby making the AOT_DITEL a drop-in replacement for the
DITEL.

This has the following consequences.

- The AOT_DITEL is now registered instead of the DITEL, which means
  that there is only one "dependency injection" TestExecutionListener
  registered at any given time.
- The SpringBootDependencyInjectionTestExecutionListener is no longer
  registered by its DefaultTestExecutionListenersPostProcessor, since
  there is no longer a DITEL that it can replace.

See spring-atticgh-1264

GraalVM: GraalVM 21.3.0 Java 11 CE (Java Version 11.0.13+7-jvmci-21.3-b05)
Date           Sample             Build Time (s)  Build Mem (GB)  RSS Mem (M)  Image Size (M)  Startup Time (s)  JVM Uptime (s)   ReflectConfig (lines)
20211116-1942  commandlinerunner  41.8            4.96            21.4         23.4            0.016             0.021           640
20211116-1944  webflux-netty      83.3            6.64            42.8         56.9            0.047             0.049           2346
20211116-1945  webmvc-tomcat      80.4            6.44            47.4         53.6            0.068             0.07            2410
20211116-1947  webflux-thymeleaf  93.4            7.16            51.1         60.9            0.044             0.045           2655
20211116-1952  grpc               48.6            5.26            26.5         26.0                                              360
20211116-1954  jdbc-tx            99.5            5.84            61.4         64.5            0.066             0.069           2964
20211116-1956  class-proxies-aop  90.7            6.20            59.0         62.3            0.074             0.077           2535
20211116-1958  batch              85.4            5.69            62.2         52.0            0.055             0.057           1693
sbrannen added a commit to sbrannen/spring-native that referenced this issue Nov 17, 2021
…tener

Prior to this commit, the AotDependencyInjectionTestExecutionListener
(AOT_DITEL) was registered via spring.factories. In addition, the
AOT_DITEL was registered immediately before the standard
DependencyInjectionTestExecutionListener (DITEL), based on their
respective orders 1999 and 2000.

With this commit, the AOT_DITEL now extends DITEL and is registered
programmatically via the TestExecutionListenerFactoriesCodeContributor
to replace the DITEL registered via spring.factories in spring-test. In
addition, AOT_DITEL delegates to the standard behavior in DITEL if the
current test class is not supported via an AOT generated application
context, thereby making the AOT_DITEL a drop-in replacement for the
DITEL.

This has the following consequences.

- The AOT_DITEL is now registered instead of the DITEL, which means
  that there is only one "dependency injection" TestExecutionListener
  registered at any given time.
- The SpringBootDependencyInjectionTestExecutionListener is no longer
  registered by its DefaultTestExecutionListenersPostProcessor, since
  there is no longer a DITEL that it can replace.

See spring-atticgh-1264

GraalVM: GraalVM 21.3.0 Java 11 CE (Java Version 11.0.13+7-jvmci-21.3-b05)
Date           Sample             Build Time (s)  Build Mem (GB)  RSS Mem (M)  Image Size (M)  Startup Time (s)  JVM Uptime (s)   ReflectConfig (lines)
20211116-1942  commandlinerunner  41.8            4.96            21.4         23.4            0.016             0.021           640
20211116-1944  webflux-netty      83.3            6.64            42.8         56.9            0.047             0.049           2346
20211116-1945  webmvc-tomcat      80.4            6.44            47.4         53.6            0.068             0.07            2410
20211116-1947  webflux-thymeleaf  93.4            7.16            51.1         60.9            0.044             0.045           2655
20211116-1952  grpc               48.6            5.26            26.5         26.0                                              360
20211116-1954  jdbc-tx            99.5            5.84            61.4         64.5            0.066             0.069           2964
20211116-1956  class-proxies-aop  90.7            6.20            59.0         62.3            0.074             0.077           2535
20211116-1958  batch              85.4            5.69            62.2         52.0            0.055             0.057           1693
sdeleuze pushed a commit that referenced this issue Nov 17, 2021
…tener

Prior to this commit, the AotDependencyInjectionTestExecutionListener
(AOT_DITEL) was registered via spring.factories. In addition, the
AOT_DITEL was registered immediately before the standard
DependencyInjectionTestExecutionListener (DITEL), based on their
respective orders 1999 and 2000.

With this commit, the AOT_DITEL now extends DITEL and is registered
programmatically via the TestExecutionListenerFactoriesCodeContributor
to replace the DITEL registered via spring.factories in spring-test. In
addition, AOT_DITEL delegates to the standard behavior in DITEL if the
current test class is not supported via an AOT generated application
context, thereby making the AOT_DITEL a drop-in replacement for the
DITEL.

This has the following consequences.

- The AOT_DITEL is now registered instead of the DITEL, which means
  that there is only one "dependency injection" TestExecutionListener
  registered at any given time.
- The SpringBootDependencyInjectionTestExecutionListener is no longer
  registered by its DefaultTestExecutionListenersPostProcessor, since
  there is no longer a DITEL that it can replace.

See gh-1264

GraalVM: GraalVM 21.3.0 Java 11 CE (Java Version 11.0.13+7-jvmci-21.3-b05)
Date           Sample             Build Time (s)  Build Mem (GB)  RSS Mem (M)  Image Size (M)  Startup Time (s)  JVM Uptime (s)   ReflectConfig (lines)
20211116-1942  commandlinerunner  41.8            4.96            21.4         23.4            0.016             0.021           640
20211116-1944  webflux-netty      83.3            6.64            42.8         56.9            0.047             0.049           2346
20211116-1945  webmvc-tomcat      80.4            6.44            47.4         53.6            0.068             0.07            2410
20211116-1947  webflux-thymeleaf  93.4            7.16            51.1         60.9            0.044             0.045           2655
20211116-1952  grpc               48.6            5.26            26.5         26.0                                              360
20211116-1954  jdbc-tx            99.5            5.84            61.4         64.5            0.066             0.069           2964
20211116-1956  class-proxies-aop  90.7            6.20            59.0         62.3            0.074             0.077           2535
20211116-1958  batch              85.4            5.69            62.2         52.0            0.055             0.057           1693
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement A general enhancement
Development

Successfully merging a pull request may close this issue.

1 participant