Class RetryExtension

  • All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider

    public class RetryExtension
    extends Object
    implements org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider, org.junit.jupiter.api.extension.AfterAllCallback
    An extension to let failed test retry.
    • Constructor Detail

      • RetryExtension

        public RetryExtension()
    • Method Detail

      • supportsTestTemplate

        public boolean supportsTestTemplate​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        supportsTestTemplate in interface org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
      • provideTestTemplateInvocationContexts

        public Stream<org.junit.jupiter.api.extension.TestTemplateInvocationContext> provideTestTemplateInvocationContexts​(org.junit.jupiter.api.extension.ExtensionContext context)
        Specified by:
        provideTestTemplateInvocationContexts in interface org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)
                      throws Exception
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
        Throws:
        Exception