fix(launcher): Campaign LA close LA2 review findings

This commit is contained in:
Erik 2026-08-14 17:20:02 +02:00
parent 000ea979d5
commit 1c5e66c05b
8 changed files with 346 additions and 58 deletions

View file

@ -441,13 +441,13 @@ public sealed class LiveSessionControllerTests
}
/// <summary>
/// The probe short-circuit fires even when the server never returns a
/// CharacterList at all (GetCharacters returns null) — a probe is a
/// connectivity check, not itself a character-selection operation, so it
/// must not fall through to the NoCharacters path.
/// Campaign LA LA2 review fix: ProbeComplete proves a real CharacterList
/// was received and reported, not merely that the socket connected. A
/// missing roster follows the existing NoCharacters non-success path and
/// still drains the exact pre-world teardown transaction.
/// </summary>
[Fact]
public void Start_ProbeWithoutCharacterListStillCompletesGracefully()
public void Start_ProbeWithoutCharacterListIsNonSuccessAndTearsDownGracefully()
{
var calls = new List<string>();
var operations = new TestOperations(calls) { Characters = null };
@ -458,10 +458,25 @@ public sealed class LiveSessionControllerTests
LiveOptions(probe: true),
host);
Assert.Equal(LiveSessionStartStatus.ProbeComplete, result.Status);
Assert.Equal(LiveSessionStartStatus.NoCharacters, result.Status);
Assert.Empty(host.Rosters);
Assert.Equal(
[
"reset", "resolve", "create", "bind", "report-connecting",
"connect", "report-connected", "deactivate",
"detach-events", "dispose-session", "detach-session", "reset",
],
calls);
Assert.Equal(0, operations.EnterWorldCount);
Assert.False(controller.IsInWorld);
Assert.Null(controller.CurrentSession);
Assert.Equal(1, operations.DisposeCounts[operations.Sessions[0]]);
LiveSessionOwnershipSnapshot ownership = controller.CaptureOwnership();
Assert.Equal(RuntimeTeardownStage.Complete, ownership.LastTeardownStages);
Assert.False(ownership.HasActiveSession);
Assert.False(ownership.HasRetiredSession);
Assert.False(ownership.HasPendingOperation);
}
[Theory]