Class UiTestContextInitializer

java.lang.Object
io.jmix.flowui.testassist.UiTestContextInitializer
All Implemented Interfaces:
org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>

public class UiTestContextInitializer extends Object implements org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
DevModeServletContextListener starts node tasks using CompletableFuture. But sometimes the thread of CompletableFuture seems is not started. It leads to hanging tests in the application. Since Vaadin 24.1 it is not enough do disable DevModeServletContextListener using:
     servletContext.setInitParameter(InitParameters.SERVLET_PARAMETER_PRODUCTION_MODE, "true");
 
So we register context initializer to add vaadin.productionMode=true property.
  • Field Details

    • PRODUCTION_MODE_ATTRIBUTE

      protected static final String PRODUCTION_MODE_ATTRIBUTE
      See Also:
    • WEBSOCKET_REQUEST_SECURITY_CONTEXT_PROVIDED_ATTRIBUTE

      protected static final String WEBSOCKET_REQUEST_SECURITY_CONTEXT_PROVIDED_ATTRIBUTE
      See Also:
  • Constructor Details

    • UiTestContextInitializer

      public UiTestContextInitializer()
  • Method Details

    • initialize

      public void initialize(org.springframework.context.ConfigurableApplicationContext applicationContext)
      Specified by:
      initialize in interface org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>