Skip to content

Commit

Permalink
Always Delete Actions Service Session (#3214)
Browse files Browse the repository at this point in the history
* Delete Actions Service session always

* update tes
  • Loading branch information
luketomlinson authored Mar 21, 2024
1 parent 4b85145 commit 8ebf298
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 @@ -188,12 +188,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, expectedSession.SessionId, It.IsAny<CancellationToken>()), Times.Never());
_settings.PoolId, expectedBrokerSession.SessionId, It.IsAny<CancellationToken>()), Times.Once());
_brokerServer
.Verify(x => x.DeleteSessionAsync(It.IsAny<CancellationToken>()), Times.Once());
}
Expand Down

0 comments on commit 8ebf298

Please sign in to comment.