Class CustomTestFailureEnricher

    • Constructor Detail

      • CustomTestFailureEnricher

        public CustomTestFailureEnricher()
    • Method Detail

      • getOutputKeys

        public Set<String> getOutputKeys()
        Description copied from interface: FailureEnricher
        Method to list all the label Keys the enricher can associate with Values in case of a failure processFailure. Note that Keys must unique and properly defined per enricher implementation otherwise will be ignored.
        Specified by:
        getOutputKeys in interface FailureEnricher
        Returns:
        the unique label Keys of the FailureEnricher
      • processFailure

        public CompletableFuture<Map<String,​String>> processFailure​(Throwable cause,
                                                                          FailureEnricher.Context context)
        Description copied from interface: FailureEnricher
        Method to handle a failure as part of the enricher and optionally return a map of KV pairs (labels). Note that Values should only be associated with Keys from getOutputKeys method otherwise will be ignored.
        Specified by:
        processFailure in interface FailureEnricher
        Parameters:
        cause - the exception that caused this failure
        context - the context that includes extra information (e.g., if it was a global failure)
        Returns:
        map of KV pairs (labels) associated with the failure