Skip to content

TestEnvironment with external service - failing tests throws IllegalStateException errors #2674

Open

Description

@gauravthadani

TestWorkflowExtension throws diagnostics error when

  • using useExternalService
  • and tests Fail

https://github.com/temporalio/sdk-java/blob/master/temporal-testing/src/main/java/io/temporal/testing/TestWorkflowEnvironmentInternal.java#L262

Expected Behavior


Failed tests
.
.
.

Actual Behavior

java.lang.IllegalStateException: getDiagnostics is not supported with the external service
	at com.google.common.base.Preconditions.checkState(Preconditions.java:512)

Steps to Reproduce the Problem

class SampleTest {

  @RegisterExtension
  public static final TestWorkflowExtension workflowExtension =
      TestWorkflowExtension.newBuilder().setDoNotStart(true).useExternalService().build();

  @Test
  void sampleTest(TestWorkflowEnvironment environment) {
    Assert.assertEquals(1, 2);
  }
}

Specifications

  • Version:
  • Platform:

Activity

  1. maciejdudko commented on Oct 1, 2025

    @maciejdudko
    Contributor

    Hi @gauravthadani, thank you for opening this issue. We'll discuss it on our next triage meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions