From f4669570072aad70b8d72c17dcf45f76066f985f Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Fri, 22 May 2020 11:38:37 -0400 Subject: [PATCH] Slightly shorter timespan as we need to not hit the Travis timeout --- src/Tgstation.Server.Host/Components/README.md | 6 ++++-- tests/Tgstation.Server.Tests/IntegrationTest.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/README.md b/src/Tgstation.Server.Host/Components/README.md index 834e183de8..6d48a22aae 100644 --- a/src/Tgstation.Server.Host/Components/README.md +++ b/src/Tgstation.Server.Host/Components/README.md @@ -8,13 +8,15 @@ Component code is where the magic and tears of TGS are made. There are six main - [The Watchdog](./Watchdog) - [The configuration system](./StaticFiles) -There exist two more namespaces in here that don't fit in these 6. +There exist two more namespaces in here that don't directly fit in these 6 components. - [Interop](./Interop) deals with the bulk of DMAPI communication (Though it's not all contained here). -- [Session](./Session) contains the classes used for actually executing DreamDaemon among other things. +- [Session](./Session) contains the classes used for actually executing DreamDaemon, sending topic requests, receiving bridge requests, among other things. Each of these is tied under the roof of an [IInstance](./IInstance.cs) ([implementation](./Instance.cs)). While the database represents stored instance data, in component code an instance is online, or doesn't exist. `IInstance`s are created via the [IInstanceFactory](./IInstanceFactory.cs) ([implementation](./InstanceFactory.cs)) and are generally controlled via the [IInstanceManager](./IInstanceManager.cs) ([implementation](./InstanceManager.cs)). + +Many classes in here implement [IHostedService](), `InstanceManager` being the only one that is called by the ASP.NET runtime. In the case of instances `StartAsync()` is called when an `Instance` is being brought online (from server startup or user request). The `Instance` handles calling `StartAsync()` on its various subcomponents that need it. When an `Instance` is being brought offline (from server shutdown/restart/update or user request) the same pattern is followed calling `StopAsync()`. diff --git a/tests/Tgstation.Server.Tests/IntegrationTest.cs b/tests/Tgstation.Server.Tests/IntegrationTest.cs index 90de88be80..26fcdd91d8 100644 --- a/tests/Tgstation.Server.Tests/IntegrationTest.cs +++ b/tests/Tgstation.Server.Tests/IntegrationTest.cs @@ -115,7 +115,7 @@ namespace Tgstation.Server.Tests using var server = new TestingServer(); using var serverCts = new CancellationTokenSource(); - serverCts.CancelAfter(TimeSpan.FromMinutes(10)); + serverCts.CancelAfter(new TimeSpan(0, 9, 30)); var cancellationToken = serverCts.Token; TerminateAllDDs(); var serverTask = server.Run(cancellationToken);