temporalio / temporalio/sdk-java
TestEnvironment with external service - failing tests throws IllegalStateException errors
Open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 433
- Forks
- 249
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 26
Description
TestWorkflowExtension throws diagnostics error when
- using
useExternalService - and tests Fail
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:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at temporal-testing/src/main/java/io/temporal/testing/TestWorkflowEnvironmentInternal.java around line 262 and reproduce the failure with TestWorkflowExtension configured with useExternalService and setDoNotStart(true). Trace why a failing test reaches the unsupported diagnostics call; done means the test reports its assertion failure instead of an IllegalStateException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100