From d5d2c254462de90e33dacfecd9628b874a0f4193 Mon Sep 17 00:00:00 2001 From: shestakovg Date: Tue, 27 Jul 2021 18:06:30 +0300 Subject: [PATCH] OSS-853: Load tests are failing and blocking a release (#161) * fixed cleaning of resources in custom headers test and decreased the size of load test Co-authored-by: Gennadii Shestakov Co-authored-by: Stanislav Parkhomenko --- FaunaDB.Client.Test/ClientTest.cs | 5 ++++- FaunaDB.Client.Test/ParallelTest.cs | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/FaunaDB.Client.Test/ClientTest.cs b/FaunaDB.Client.Test/ClientTest.cs index 38fa36e3..0efafc97 100644 --- a/FaunaDB.Client.Test/ClientTest.cs +++ b/FaunaDB.Client.Test/ClientTest.cs @@ -234,7 +234,7 @@ public async Task TestGetAnInstance() [Test] public async Task TestGetAnInstanceWithCustomHeaders() { - var clientWithCustomHeaders = new FaunaClient( + var rootClientWithCustomHeaders = new FaunaClient( secret: faunaSecret, endpoint: faunaEndpoint, customHeaders: new Dictionary @@ -244,6 +244,9 @@ public async Task TestGetAnInstanceWithCustomHeaders() } ); + var clientWithCustomHeadersKey = await rootClientWithCustomHeaders.Query(CreateKey(Obj("database", DbRef, "role", "server"))); + var clientWithCustomHeaders = rootClientWithCustomHeaders.NewSessionClient(clientWithCustomHeadersKey.Get(SECRET_FIELD)); + await clientWithCustomHeaders.Query( CreateCollection( Obj("name", "magic_spells")) diff --git a/FaunaDB.Client.Test/ParallelTest.cs b/FaunaDB.Client.Test/ParallelTest.cs index 4d18b013..a9b0da4f 100644 --- a/FaunaDB.Client.Test/ParallelTest.cs +++ b/FaunaDB.Client.Test/ParallelTest.cs @@ -13,8 +13,8 @@ namespace Test { public class ParallelTest : TestCase { - private const int IN_PARALLEL = 1000; - private const int MAX_ATTEMPTS = 10; + private const int IN_PARALLEL = 200; + private const int MAX_ATTEMPTS = 5; private const string COLLECTION_NAME = "ParallelTestCollection"; [OneTimeSetUp]