Skip to content

Commit

Permalink
Revert "Always Delete Actions Service Session (actions#3214)"
Browse files Browse the repository at this point in the history
This reverts commit 8ebf298.
  • Loading branch information
Siasc1144 committed Jun 24, 2024
1 parent f467e9e commit 25acd2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Runner.Listener/MessageListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ public async Task DeleteSessionAsync()
{
using (var ts = new CancellationTokenSource(TimeSpan.FromSeconds(30)))
{
await _runnerServer.DeleteAgentSessionAsync(_settings.PoolId, _session.SessionId, ts.Token);

if (_isBrokerSession)
{
await _brokerServer.DeleteSessionAsync(ts.Token);
return;
}
await _runnerServer.DeleteAgentSessionAsync(_settings.PoolId, _session.SessionId, ts.Token);
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/Test/L0/Listener/MessageListenerL0.cs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public async void DeleteSessionWithBrokerMigration()
//Assert
_runnerServer
.Verify(x => x.DeleteAgentSessionAsync(
_settings.PoolId, expectedBrokerSession.SessionId, It.IsAny<CancellationToken>()), Times.Once());
_settings.PoolId, expectedSession.SessionId, It.IsAny<CancellationToken>()), Times.Never());
_brokerServer
.Verify(x => x.DeleteSessionAsync(It.IsAny<CancellationToken>()), Times.Once());
}
Expand Down

0 comments on commit 25acd2b

Please sign in to comment.