Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit b9729dd

Browse files
committed
Update RedisBasicPersistenceProviderTests.Async.cs
1 parent b511433 commit b9729dd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/ServiceStack.Redis.Tests/RedisBasicPersistenceProviderTests.Async.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,16 @@ public async Task Can_As_DeleteAll_with_script()
218218
}.Init();
219219

220220
var type = typeof(TestModel).FullName;
221+
#if DEBUG
221222
RedisRaw.DebugAllowSync = true; // not reasonable to allow async from Lisp
223+
#endif
222224
context.EvaluateCode($"redis.call('DeleteAll<{type}>') |> return");
223225
context.EvaluateCode($"redis.call('As<{type}>').call('DeleteAll') |> return");
224226
context.RenderLisp($"(call redis \"DeleteAll<{type}>\")");
225227
context.RenderLisp($"(call (call redis \"As<{type}>\") \"DeleteAll\")");
228+
#if DEBUG
226229
RedisRaw.DebugAllowSync = false;
230+
#endif
227231

228232
var allModels = await RedisAsync.As<TestModel>().GetAllAsync();
229233
Assert.That(allModels, Is.Empty);

0 commit comments

Comments
 (0)