Files
Delta-v/Content.IntegrationTests/Fixtures/GameTest.Pair.cs
T
MoonyandTayrtahn 3c48c0129f GameTest part 1 (#43182)
* Ports much of GameTest, minus all the WIP stuff.

* remark.

* EnsureCVar now adds test properties.

* Some cleanup and functionality.

* Ignore broken test. Needs fixed eventually. Also explicit context config.

* TrackingIssue attribute.

* oops

* Pair config attribute.

* Remove SystemAttribute in favor of using the EntitySystemManager dependency collection.

* Ensure idleness.

* More tests for tests.

* More specific failure catching tests.

* Reverse attribute resolution order so suite-wide attributes happen first.

* Get rid of AffectedProperties again because I need to refactor PoolSettings for that.

* Poke

* Final cleanup pass.

* Update Content.IntegrationTests/Fixtures/Attributes/RunOnSideAttribute.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

* Update Content.IntegrationTests/Fixtures/Attributes/Side.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

* Update Content.IntegrationTests/NUnit/Utilities/ITestExtensions.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

* Fixes.

* shut up nunit.

* Make TrackingIssue a bit strict on purpose, so people don't put junk here.

* Update Content.IntegrationTests/Tests/GameTestTests/DisconnectedDependencyTest.cs

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

* Address.

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2026-06-29 12:44:15 +02:00

37 lines
1.1 KiB
C#

namespace Content.IntegrationTests.Fixtures;
public abstract partial class GameTest
{
/// <summary>
/// Runs the client and server for the given number of ticks, in lockstep.
/// </summary>
/// <remarks>
/// Do not use this as a barrier for client-server synchronization, use <see cref="RunUntilSynced"/>.
/// </remarks>
public Task RunTicksSync(int ticks)
{
return Pair.RunTicksSync(ticks);
}
/// <summary>
/// Runs the pairs just long enough for PVS to send entities, ensuring the client's current tick is what the
/// server's was at call time.
/// </summary>
public async Task RunUntilSynced()
{
await Pair.RunUntilSynced();
}
/// <summary>
/// Runs the test pair for a number of (simulated) seconds.
/// </summary>
/// <remarks>
/// Does not actually take N seconds to evaluate, the game ticks as fast as possible.
/// Do not use this as a barrier for client-server synchronization, use <see cref="RunUntilSynced"/>.
/// </remarks>
public Task RunSeconds(float seconds)
{
return Pair.RunSeconds(seconds);
}
}