From 1b97663a070d6e2536c2b346a7745379f626eb7f Mon Sep 17 00:00:00 2001 From: Florian Hockmann Date: Thu, 9 Sep 2021 11:55:16 +0200 Subject: [PATCH] Fix GremlinServerContainer for AggregateException For some reason, we're now getting the underlying exception wrapped in an AggregateException when we try to connect to the server when it is not ready yet. Signed-off-by: Florian Hockmann --- .../GremlinServerContainer.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/JanusGraph.Net.IntegrationTest/GremlinServerContainer.cs b/test/JanusGraph.Net.IntegrationTest/GremlinServerContainer.cs index f7e9fb3..dba3956 100644 --- a/test/JanusGraph.Net.IntegrationTest/GremlinServerContainer.cs +++ b/test/JanusGraph.Net.IntegrationTest/GremlinServerContainer.cs @@ -77,8 +77,15 @@ protected override async Task ContainerStarted() private async Task IsServerStartedAsync() { - using var client = new GremlinClient(new GremlinServer(Host, Port)); - return await client.SubmitWithSingleResultAsync(ServerStartedCheckTraversal); + try + { + using var client = new GremlinClient(new GremlinServer(Host, Port)); + return await client.SubmitWithSingleResultAsync(ServerStartedCheckTraversal); + } + catch (AggregateException e) when(e.InnerException != null) + { + throw e.InnerException; + } } } } \ No newline at end of file