Prove native QUIC against the released Aetheria daemon
This commit is contained in:
parent
ac666d6d08
commit
63dfe1f792
7 changed files with 70 additions and 4 deletions
|
|
@ -16,6 +16,7 @@
|
|||
"GameCult.Caching.dll",
|
||||
"GameCult.Caching.MessagePack.dll",
|
||||
"GameCult.Mesh.dll",
|
||||
"GameCult.Mesh.Quic.Native.dll",
|
||||
"GameCult.Networking.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using GameCult.Caching;
|
||||
using GameCult.Caching.MessagePack;
|
||||
using GameCult.Eve.Surface;
|
||||
|
|
@ -10,6 +12,7 @@ using GameCult.Eve.UnityUIToolkit;
|
|||
using GameCult.Eve.UnityScene;
|
||||
using GameCult.Eve.UnityScene.Fields;
|
||||
using GameCult.Mesh;
|
||||
using GameCult.Mesh.Quic.Native;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
|
@ -305,6 +308,18 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
Assert.That(provider.Selection.VerseId, Is.Not.Empty);
|
||||
Assert.That(provider.Selection.ProviderId, Is.Not.Empty);
|
||||
Assert.That(provider.Selection.SurfaceId, Is.Not.Empty);
|
||||
var quicProof = ReceiveAdvertisedRealtimeFrameAsync(
|
||||
rendezvousEndpoint,
|
||||
provider.Selection.VerseId);
|
||||
var quicDeadline = Time.realtimeSinceStartup + 15f;
|
||||
while (!quicProof.IsCompleted && Time.realtimeSinceStartup < quicDeadline)
|
||||
yield return new WaitForSecondsRealtime(0.05f);
|
||||
if (!quicProof.IsCompleted)
|
||||
throw new TimeoutException("Timed out receiving advertised CultMesh QUIC state in Unity.");
|
||||
var quicFrame = quicProof.GetAwaiter().GetResult();
|
||||
Assert.That(quicFrame.Delivery, Is.EqualTo(CultMeshRealtimeDelivery.LatestOnly));
|
||||
Assert.That(quicFrame.BodyId, Is.Not.Empty);
|
||||
Assert.That(quicFrame.SchemaId, Is.Not.Empty);
|
||||
Assert.That(provider.CurrentAssetBodyTransportKind, Is.Null,
|
||||
"Publishing the provider catalog eagerly transferred an asset bundle.");
|
||||
host = root.AddComponent<EveUnityPlayableWorldClientHost>();
|
||||
|
|
@ -1166,6 +1181,23 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
}
|
||||
}
|
||||
|
||||
private static async Task<CultMeshRealtimeFrame> ReceiveAdvertisedRealtimeFrameAsync(
|
||||
string rendezvousEndpoint,
|
||||
string verseId)
|
||||
{
|
||||
using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(15));
|
||||
using var client = new CultMeshClient(new CultMeshClientOptions
|
||||
{
|
||||
RendezvousEndpoints = new[] { rendezvousEndpoint },
|
||||
RealtimeConnectors = new ICultMeshRealtimeTransportConnector[]
|
||||
{
|
||||
new CultMeshNativeQuicRealtimeTransportConnector()
|
||||
}
|
||||
});
|
||||
using var session = await client.ConnectRealtimeAsync(verseId, timeout.Token);
|
||||
return await session.ReceiveAsync(timeout.Token);
|
||||
}
|
||||
|
||||
private static void WriteWitnessFacts(
|
||||
string witnessProfile,
|
||||
string gameplayScenario,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.uielements": "1.0.0",
|
||||
"com.unity.render-pipelines.universal": "17.4.0",
|
||||
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.36",
|
||||
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.38",
|
||||
"org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.2.3",
|
||||
"org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.4",
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.97",
|
||||
|
|
|
|||
|
|
@ -119,11 +119,11 @@
|
|||
}
|
||||
},
|
||||
"org.gamecult.cultlib": {
|
||||
"version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.36",
|
||||
"version": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.38",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "1d126f4a35d0189224b5acea2f2891ef7663519a"
|
||||
"hash": "c6cf04a342a013afab52063a9b5445a3683700d4"
|
||||
},
|
||||
"org.gamecult.eve.plugin-fields": {
|
||||
"version": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.2.3",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
"GameCult.Caching.dll",
|
||||
"GameCult.Caching.MessagePack.dll",
|
||||
"GameCult.Mesh.dll",
|
||||
"GameCult.Mesh.Quic.Native.dll",
|
||||
"GameCult.Networking.dll"
|
||||
],
|
||||
"autoReferenced": false,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using GameCult.Caching;
|
||||
using GameCult.Caching.MessagePack;
|
||||
using GameCult.Eve.Surface;
|
||||
|
|
@ -10,6 +12,7 @@ using GameCult.Eve.UnityUIToolkit;
|
|||
using GameCult.Eve.UnityScene;
|
||||
using GameCult.Eve.UnityScene.Fields;
|
||||
using GameCult.Mesh;
|
||||
using GameCult.Mesh.Quic.Native;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
|
@ -305,6 +308,18 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
Assert.That(provider.Selection.VerseId, Is.Not.Empty);
|
||||
Assert.That(provider.Selection.ProviderId, Is.Not.Empty);
|
||||
Assert.That(provider.Selection.SurfaceId, Is.Not.Empty);
|
||||
var quicProof = ReceiveAdvertisedRealtimeFrameAsync(
|
||||
rendezvousEndpoint,
|
||||
provider.Selection.VerseId);
|
||||
var quicDeadline = Time.realtimeSinceStartup + 15f;
|
||||
while (!quicProof.IsCompleted && Time.realtimeSinceStartup < quicDeadline)
|
||||
yield return new WaitForSecondsRealtime(0.05f);
|
||||
if (!quicProof.IsCompleted)
|
||||
throw new TimeoutException("Timed out receiving advertised CultMesh QUIC state in Unity.");
|
||||
var quicFrame = quicProof.GetAwaiter().GetResult();
|
||||
Assert.That(quicFrame.Delivery, Is.EqualTo(CultMeshRealtimeDelivery.LatestOnly));
|
||||
Assert.That(quicFrame.BodyId, Is.Not.Empty);
|
||||
Assert.That(quicFrame.SchemaId, Is.Not.Empty);
|
||||
Assert.That(provider.CurrentAssetBodyTransportKind, Is.Null,
|
||||
"Publishing the provider catalog eagerly transferred an asset bundle.");
|
||||
host = root.AddComponent<EveUnityPlayableWorldClientHost>();
|
||||
|
|
@ -1166,6 +1181,23 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests
|
|||
}
|
||||
}
|
||||
|
||||
private static async Task<CultMeshRealtimeFrame> ReceiveAdvertisedRealtimeFrameAsync(
|
||||
string rendezvousEndpoint,
|
||||
string verseId)
|
||||
{
|
||||
using var timeout = new CancellationTokenSource(TimeSpan.FromSeconds(15));
|
||||
using var client = new CultMeshClient(new CultMeshClientOptions
|
||||
{
|
||||
RendezvousEndpoints = new[] { rendezvousEndpoint },
|
||||
RealtimeConnectors = new ICultMeshRealtimeTransportConnector[]
|
||||
{
|
||||
new CultMeshNativeQuicRealtimeTransportConnector()
|
||||
}
|
||||
});
|
||||
using var session = await client.ConnectRealtimeAsync(verseId, timeout.Token);
|
||||
return await session.ReceiveAsync(timeout.Token);
|
||||
}
|
||||
|
||||
private static void WriteWitnessFacts(
|
||||
string witnessProfile,
|
||||
string gameplayScenario,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ $ErrorActionPreference = "Stop"
|
|||
$expectedEveUnityCommit = "44e338bd9eb4997f2235f7aa711b79bc5d5c12ff"
|
||||
$expectedEveFieldsCommit = "c5a4a75c1b727499b16c2dae1895f29e2a9f72f0"
|
||||
$expectedEveUnityUiToolkitCommit = "4d0cbe0185bdc4fc65eb63503a7c5cb578539669"
|
||||
$expectedCultLibCommit = "1d126f4a35d0189224b5acea2f2891ef7663519a"
|
||||
$expectedCultLibCommit = "c6cf04a342a013afab52063a9b5445a3683700d4"
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$projectRoot = $ClientProject
|
||||
$outputRoot = if ([IO.Path]::IsPathRooted($OutputDirectory)) { $OutputDirectory } else { Join-Path $repoRoot $OutputDirectory }
|
||||
|
|
|
|||
Reference in a new issue