Skip to content

Commit 8520a4b

Browse files
remove bad test
1 parent 40d9882 commit 8520a4b

1 file changed

Lines changed: 0 additions & 55 deletions

File tree

tests/Temporalio.Tests/Worker/NexusWorkerTests.cs

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,61 +1751,6 @@ await RunInWorkflowAsync(workerOptions, async () =>
17511751
});
17521752
}
17531753

1754-
[Fact]
1755-
public async Task ExecuteNexusOperationAsync_GenericHandler_StartActivity_NoTimeout_Fails()
1756-
{
1757-
// Activity start in Nexus requires at least one of StartToCloseTimeout or
1758-
// ScheduleToCloseTimeout. Missing both should surface as a NexusOperationFailureException
1759-
// wrapping a BadRequest HandlerException.
1760-
var workerOptions = new TemporalWorkerOptions($"tq-{Guid.NewGuid()}").
1761-
AddNexusService(new HandlerFactoryStringService(() =>
1762-
TemporalOperationHandler.FromHandleFactory<string, string>(
1763-
async (context, client, input) =>
1764-
await client.StartActivityAsync<string>(
1765-
() => ActivityStubs.EchoAsync(input),
1766-
new() { Id = $"echo-no-timeout-{input}" })))).
1767-
AddActivity(ActivityStubs.EchoAsync);
1768-
var endpoint = await CreateNexusEndpointAsync(workerOptions.TaskQueue!);
1769-
1770-
var wfExc = await Assert.ThrowsAsync<WorkflowFailedException>(() =>
1771-
RunInWorkflowAsync(workerOptions, async () =>
1772-
{
1773-
await Workflow.CreateNexusWorkflowClient<IStringService>(endpoint).
1774-
ExecuteNexusOperationAsync(svc => svc.DoSomething("oops"));
1775-
}));
1776-
var nexusExc = Assert.IsType<NexusOperationFailureException>(wfExc.InnerException);
1777-
var handlerExc = Assert.IsType<HandlerException>(nexusExc.InnerException);
1778-
Assert.Equal(HandlerErrorType.BadRequest, handlerExc.ErrorType);
1779-
Assert.Contains("ScheduleToCloseTimeout", handlerExc.Message);
1780-
}
1781-
1782-
[Fact]
1783-
public async Task ExecuteNexusOperationAsync_GenericHandler_StartActivity_NoId_Fails()
1784-
{
1785-
// Activity ID must be set explicitly so that retries of a Nexus start are idempotent;
1786-
// auto-generating it would produce a different ID on each retry attempt.
1787-
var workerOptions = new TemporalWorkerOptions($"tq-{Guid.NewGuid()}").
1788-
AddNexusService(new HandlerFactoryStringService(() =>
1789-
TemporalOperationHandler.FromHandleFactory<string, string>(
1790-
async (context, client, input) =>
1791-
await client.StartActivityAsync<string>(
1792-
() => ActivityStubs.EchoAsync(input),
1793-
new() { ScheduleToCloseTimeout = TimeSpan.FromMinutes(1) })))).
1794-
AddActivity(ActivityStubs.EchoAsync);
1795-
var endpoint = await CreateNexusEndpointAsync(workerOptions.TaskQueue!);
1796-
1797-
var wfExc = await Assert.ThrowsAsync<WorkflowFailedException>(() =>
1798-
RunInWorkflowAsync(workerOptions, async () =>
1799-
{
1800-
await Workflow.CreateNexusWorkflowClient<IStringService>(endpoint).
1801-
ExecuteNexusOperationAsync(svc => svc.DoSomething("oops"));
1802-
}));
1803-
var nexusExc = Assert.IsType<NexusOperationFailureException>(wfExc.InnerException);
1804-
var handlerExc = Assert.IsType<HandlerException>(nexusExc.InnerException);
1805-
Assert.Equal(HandlerErrorType.BadRequest, handlerExc.ErrorType);
1806-
Assert.Contains("ID required to start activity", handlerExc.Message);
1807-
}
1808-
18091754
[Fact]
18101755
public async Task ExecuteNexusOperationAsync_GenericHandler_CancelActivity_CancelsUnderlying()
18111756
{

0 commit comments

Comments
 (0)