diff --git a/src/NRedisStack/Auxiliary.cs b/src/NRedisStack/Auxiliary.cs index 25f456f3..761e6a7a 100644 --- a/src/NRedisStack/Auxiliary.cs +++ b/src/NRedisStack/Auxiliary.cs @@ -61,26 +61,31 @@ internal static void SetInfoInPipeline(this IDatabase db) } } +#if DEBUG + private const CommandFlags Flags = CommandFlags.NoRedirect; // disable redirect, so we spot -MOVED in tests +#else + private const CommandFlags Flags = CommandFlags.None; +#endif public static RedisResult Execute(this IDatabase db, SerializedCommand command) { db.SetInfoInPipeline(); - return db.Execute(command.Command, command.Args); + return db.Execute(command.Command, command.Args, flags: Flags); } internal static RedisResult Execute(this IServer server, int? db, SerializedCommand command) { - return server.Execute(db, command.Command, command.Args); + return server.Execute(db, command.Command, command.Args, flags: Flags); } public static async Task ExecuteAsync(this IDatabaseAsync db, SerializedCommand command) { ((IDatabase)db).SetInfoInPipeline(); - return await db.ExecuteAsync(command.Command, command.Args); + return await db.ExecuteAsync(command.Command, command.Args, flags: Flags); } internal static async Task ExecuteAsync(this IServer server, int? db, SerializedCommand command) { - return await server.ExecuteAsync(db, command.Command, command.Args); + return await server.ExecuteAsync(db, command.Command, command.Args, flags: Flags); } public static List ExecuteBroadcast(this IDatabase db, string command) diff --git a/src/NRedisStack/Json/JsonCommandBuilder.cs b/src/NRedisStack/Json/JsonCommandBuilder.cs index 1f6e684b..bee4061d 100644 --- a/src/NRedisStack/Json/JsonCommandBuilder.cs +++ b/src/NRedisStack/Json/JsonCommandBuilder.cs @@ -71,8 +71,8 @@ public static SerializedCommand Type(RedisKey key, string? path = null) public static SerializedCommand DebugMemory(string key, string? path = null) { return (path != null) - ? new(JSON.DEBUG, JSON.MEMORY, key, path) - : new SerializedCommand(JSON.DEBUG, JSON.MEMORY, key); + ? new(JSON.DEBUG, JSON.MEMORY, (RedisKey)key, path) + : new SerializedCommand(JSON.DEBUG, JSON.MEMORY, (RedisKey)key); } public static SerializedCommand ArrAppend(RedisKey key, string? path = null, params object[] values) diff --git a/src/NRedisStack/Search/SearchCommandBuilder.cs b/src/NRedisStack/Search/SearchCommandBuilder.cs index b2206a07..78014096 100644 --- a/src/NRedisStack/Search/SearchCommandBuilder.cs +++ b/src/NRedisStack/Search/SearchCommandBuilder.cs @@ -196,7 +196,7 @@ public static SerializedCommand SpellCheck(string indexName, string query, FTSpe public static SerializedCommand SugAdd(string key, string str, double score, bool increment = false, string? payload = null) { - var args = new List { key, str, score }; + var args = new List { (RedisKey)key, str, score }; if (increment) { args.Add(SearchArgs.INCR); } if (payload != null) { args.Add(SearchArgs.PAYLOAD); args.Add(payload); } return new(FT.SUGADD, args); @@ -204,12 +204,12 @@ public static SerializedCommand SugAdd(string key, string str, double score, boo public static SerializedCommand SugDel(string key, string str) { - return new(FT.SUGDEL, key, str); + return new(FT.SUGDEL, (RedisKey)key, str); } public static SerializedCommand SugGet(string key, string prefix, bool fuzzy = false, bool withScores = false, bool withPayloads = false, int? max = null) { - var args = new List { key, prefix }; + var args = new List { (RedisKey)key, prefix }; if (fuzzy) { args.Add(SearchArgs.FUZZY); } if (withScores) { args.Add(SearchArgs.WITHSCORES); } if (withPayloads) { args.Add(SearchArgs.WITHPAYLOADS); } @@ -219,7 +219,7 @@ public static SerializedCommand SugGet(string key, string prefix, bool fuzzy = f public static SerializedCommand SugLen(string key) { - return new(FT.SUGLEN, key); + return new(FT.SUGLEN, (RedisKey)key); } public static SerializedCommand SynDump(string indexName) diff --git a/src/NRedisStack/Tdigest/TdigestCommandBuilder.cs b/src/NRedisStack/Tdigest/TdigestCommandBuilder.cs index dbcad0a8..bfc480ad 100644 --- a/src/NRedisStack/Tdigest/TdigestCommandBuilder.cs +++ b/src/NRedisStack/Tdigest/TdigestCommandBuilder.cs @@ -8,12 +8,11 @@ public static class TdigestCommandBuilder { public static SerializedCommand Add(RedisKey key, params double[] values) { - if (values.Length < 0) throw new ArgumentOutOfRangeException(nameof(values)); - var args = new string[values.Length + 1]; - args[0] = key.ToString(); + var args = new object[values.Length + 1]; + args[0] = key; for (int i = 0; i < values.Length; i++) { - args[i + 1] = values[i].ToString(); + args[i + 1] = values[i]; } return new(TDIGEST.ADD, args); diff --git a/src/NRedisStack/TimeSeries/DataTypes/TSParameters.cs b/src/NRedisStack/TimeSeries/DataTypes/TSParameters.cs index ce799501..7cdd5394 100644 --- a/src/NRedisStack/TimeSeries/DataTypes/TSParameters.cs +++ b/src/NRedisStack/TimeSeries/DataTypes/TSParameters.cs @@ -1,5 +1,6 @@ using NRedisStack.DataTypes; using NRedisStack.Literals.Enums; +using StackExchange.Redis; namespace NRedisStack; @@ -17,7 +18,7 @@ internal TsBaseParams(IList parameters) this.parameters = parameters; } - internal object[] ToArray(string key) + internal object[] ToArray(RedisKey key) { parameters.Insert(0, key); return parameters.ToArray(); diff --git a/tests/NRedisStack.Tests/Search/SearchTests.cs b/tests/NRedisStack.Tests/Search/SearchTests.cs index d24df7cb..5d3f7728 100644 --- a/tests/NRedisStack.Tests/Search/SearchTests.cs +++ b/tests/NRedisStack.Tests/Search/SearchTests.cs @@ -67,6 +67,7 @@ private async Task AssertDatabaseSizeAsync(IDatabase db, int expected) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestAggregationRequestVerbatim(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new(); @@ -90,6 +91,7 @@ public void TestAggregationRequestVerbatim(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestAggregationRequestVerbatimAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new(); @@ -113,6 +115,7 @@ public async Task TestAggregationRequestVerbatimAsync(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestAggregationRequestTimeout(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new(); @@ -135,6 +138,7 @@ public void TestAggregationRequestTimeout(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestAggregationRequestTimeoutAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new(); @@ -306,6 +310,7 @@ public async Task TestAggregationsLoadAsync(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestAggregationRequestParamsDialect(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new(); @@ -337,6 +342,7 @@ public void TestAggregationRequestParamsDialect(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestAggregationRequestParamsDialectAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new(); @@ -369,6 +375,7 @@ public async Task TestAggregationRequestParamsDialectAsync(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestAggregationRequestParamsWithDefaultDialect(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(2); Schema sc = new(); @@ -400,6 +407,7 @@ public void TestAggregationRequestParamsWithDefaultDialect(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestAggregationRequestParamsWithDefaultDialectAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(2); Schema sc = new(); @@ -439,6 +447,7 @@ public void TestDefaultDialectError() [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestAlias(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new Schema().AddTextField("field1"); @@ -477,6 +486,7 @@ public void TestAlias(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestAliasAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new Schema().AddTextField("field1"); @@ -1048,6 +1058,7 @@ public void AlterAddSortable(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void InfoWithIndexEmptyAndIndexMissing(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); db.Execute("FLUSHALL"); var ft = db.FT(2); @@ -1790,6 +1801,7 @@ public async Task TestDictionaryAsync(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestExplain(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new Schema() @@ -1812,6 +1824,7 @@ public void TestExplain(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestExplainAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); Schema sc = new Schema() @@ -1835,6 +1848,7 @@ public async Task TestExplainAsync(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestExplainCli(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(2); Schema sc = new Schema() @@ -1858,6 +1872,7 @@ public void TestExplainCli(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestExplainCliAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(2); Schema sc = new Schema() @@ -1881,6 +1896,7 @@ public async Task TestExplainCliAsync(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestExplainWithDefaultDialect(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(1); Schema sc = new Schema() @@ -1898,6 +1914,7 @@ public void TestExplainWithDefaultDialect(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestExplainWithDefaultDialectAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(1); Schema sc = new Schema() @@ -1915,6 +1932,7 @@ public async Task TestExplainWithDefaultDialectAsync(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestSynonym(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); var sc = new Schema().AddTextField("name", 1.0).AddTextField("addr", 1.0); @@ -1941,6 +1959,7 @@ public void TestSynonym(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestSynonymAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); var sc = new Schema().AddTextField("name", 1.0).AddTextField("addr", 1.0); @@ -2756,6 +2775,7 @@ public void TestQueryParamsWithParams_DefaultDialect(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestBasicSpellCheck(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); @@ -2777,6 +2797,7 @@ public void TestBasicSpellCheck(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public async Task TestBasicSpellCheckAsync(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); @@ -2925,10 +2946,12 @@ public async Task TestQueryParamsWithParams_DefaultDialectAsync(string endpointI readonly string key = "SugTestKey"; - [Fact] - public void TestAddAndGetSuggestion() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public void TestAddAndGetSuggestion(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); string suggestion = "ANOTHER_WORD"; @@ -2947,10 +2970,12 @@ public void TestAddAndGetSuggestion() Assert.Single(ft.SugGet(key, noMatch.Substring(1, 6), true, max: 5)); } - [Fact] - public async Task TestAddAndGetSuggestionAsync() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public async Task TestAddAndGetSuggestionAsync(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); string suggestion = "ANOTHER_WORD"; @@ -2969,10 +2994,12 @@ public async Task TestAddAndGetSuggestionAsync() Assert.Single(await ft.SugGetAsync(key, noMatch.Substring(1, 6), true, max: 5)); } - [Fact] - public void AddSuggestionIncrAndGetSuggestionFuzzy() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public void AddSuggestionIncrAndGetSuggestionFuzzy(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); string suggestion = "TOPIC OF WORDS"; @@ -2983,10 +3010,12 @@ public void AddSuggestionIncrAndGetSuggestionFuzzy() Assert.Equal(suggestion, ft.SugGet(key, suggestion.Substring(0, 3))[0]); } - [Fact] - public async Task AddSuggestionIncrAndGetSuggestionFuzzyAsync() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public async Task AddSuggestionIncrAndGetSuggestionFuzzyAsync(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); string suggestion = "TOPIC OF WORDS"; @@ -2997,10 +3026,12 @@ public async Task AddSuggestionIncrAndGetSuggestionFuzzyAsync() Assert.Equal(suggestion, (await ft.SugGetAsync(key, suggestion.Substring(0, 3)))[0]); } - [Fact] - public void getSuggestionScores() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public void getSuggestionScores(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); ft.SugAdd(key, "COUNT_ME TOO", 1); ft.SugAdd(key, "COUNT", 1); @@ -3017,10 +3048,12 @@ public void getSuggestionScores() } } - [Fact] - public async Task getSuggestionScoresAsync() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public async Task getSuggestionScoresAsync(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); await ft.SugAddAsync(key, "COUNT_ME TOO", 1); await ft.SugAddAsync(key, "COUNT", 1); @@ -3037,10 +3070,12 @@ public async Task getSuggestionScoresAsync() } } - [Fact] - public void getSuggestionMax() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public void getSuggestionMax(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); ft.SugAdd(key, "COUNT_ME TOO", 1); ft.SugAdd(key, "COUNT", 1); @@ -3051,10 +3086,12 @@ public void getSuggestionMax() Assert.Equal(2, ft.SugGetWithScores(key, "COU", true, max: 2).Count); } - [Fact] - public async Task getSuggestionMaxAsync() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public async Task getSuggestionMaxAsync(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); await ft.SugAddAsync(key, "COUNT_ME TOO", 1); await ft.SugAddAsync(key, "COUNT", 1); @@ -3065,10 +3102,12 @@ public async Task getSuggestionMaxAsync() Assert.Equal(2, (await ft.SugGetWithScoresAsync(key, "COU", true, max: 2)).Count); } - [Fact] - public void getSuggestionNoHit() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public void getSuggestionNoHit(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); ft.SugAdd(key, "NO WORD", 0.4); @@ -3076,10 +3115,12 @@ public void getSuggestionNoHit() Assert.Empty(ft.SugGet(key, "DIF")); } - [Fact] - public async Task getSuggestionNoHitAsync() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public async Task GetSuggestionNoHitAsync(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); await ft.SugAddAsync(key, "NO WORD", 0.4); @@ -3087,10 +3128,12 @@ public async Task getSuggestionNoHitAsync() Assert.Empty((await ft.SugGetAsync(key, "DIF"))); } - [Fact] - public void getSuggestionLengthAndDeleteSuggestion() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public void GetSuggestionLengthAndDeleteSuggestion(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); ft.SugAdd(key, "TOPIC OF WORDS", 1, increment: true); ft.SugAdd(key, "ANOTHER ENTRY", 1, increment: true); @@ -3109,10 +3152,12 @@ public void getSuggestionLengthAndDeleteSuggestion() Assert.Equal(2L, ft.SugLen(key)); } - [Fact] - public async Task getSuggestionLengthAndDeleteSuggestionAsync() + [SkippableTheory] + [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] + public async Task getSuggestionLengthAndDeleteSuggestionAsync(string endpointId) { - IDatabase db = GetCleanDatabase(); + SkipClusterPre8(endpointId); + IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); await ft.SugAddAsync(key, "TOPIC OF WORDS", 1, increment: true); await ft.SugAddAsync(key, "ANOTHER ENTRY", 1, increment: true); @@ -3432,6 +3477,7 @@ public void TestProfileCommandBuilder() [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void Issue175(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); SearchCommands ft = db.FT(); @@ -3716,6 +3762,7 @@ public void Issue230() [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestNumericInDialect4(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); @@ -3739,6 +3786,7 @@ public void TestNumericInDialect4(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestNumericOperatorsInDialect4(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); @@ -3768,6 +3816,7 @@ public void TestNumericOperatorsInDialect4(string endpointId) [MemberData(nameof(EndpointsFixture.Env.AllEnvironments), MemberType = typeof(EndpointsFixture.Env))] public void TestNumericLogicalOperatorsInDialect4(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); @@ -3822,6 +3871,7 @@ public void TestDocumentLoad_Issue352() [MemberData(nameof(EndpointsFixture.Env.StandaloneOnly), MemberType = typeof(EndpointsFixture.Env))] public async Task TestDocumentLoadWithDB_Issue352(string endpointId) { + SkipClusterPre8(endpointId); IDatabase db = GetCleanDatabase(endpointId); var ft = db.FT(); diff --git a/tests/NRedisStack.Tests/TimeSeries/TestAPI/TestCreate.cs b/tests/NRedisStack.Tests/TimeSeries/TestAPI/TestCreate.cs index 91fa05a8..187216a5 100644 --- a/tests/NRedisStack.Tests/TimeSeries/TestAPI/TestCreate.cs +++ b/tests/NRedisStack.Tests/TimeSeries/TestAPI/TestCreate.cs @@ -137,7 +137,7 @@ public void TestParamsBuilder() .AddUncompressed(true).build(); var command = TimeSeriesCommandsBuilder.Create(key, parameters); - var expectedArgs = new object[] { key, "RETENTION", 5000L, "CHUNK_SIZE", 1000L, "LABELS", "key", "value", "UNCOMPRESSED", "DUPLICATE_POLICY", "FIRST", "IGNORE", 11L, 12L }; + var expectedArgs = new object[] { (RedisKey)key, "RETENTION", 5000L, "CHUNK_SIZE", 1000L, "LABELS", "key", "value", "UNCOMPRESSED", "DUPLICATE_POLICY", "FIRST", "IGNORE", 11L, 12L }; Assert.Equal(expectedArgs, command.Args); parameters = new TsCreateParamsBuilder() @@ -149,7 +149,7 @@ public void TestParamsBuilder() .AddUncompressed(false).build(); command = TimeSeriesCommandsBuilder.Create(key, parameters); - expectedArgs = [key, "RETENTION", 5000L, "CHUNK_SIZE", 1000L, "LABELS", "key", "value", "COMPRESSED", "DUPLICATE_POLICY", "FIRST", "IGNORE", 11L, 12L + expectedArgs = [(RedisKey)key, "RETENTION", 5000L, "CHUNK_SIZE", 1000L, "LABELS", "key", "value", "COMPRESSED", "DUPLICATE_POLICY", "FIRST", "IGNORE", 11L, 12L ]; Assert.Equal(expectedArgs, command.Args); } diff --git a/tests/NRedisStack.Tests/TimeSeries/TestAPI/TimeSeriesHelper.cs b/tests/NRedisStack.Tests/TimeSeries/TestAPI/TimeSeriesHelper.cs index 2bc6c4f0..97ba38b4 100644 --- a/tests/NRedisStack.Tests/TimeSeries/TestAPI/TimeSeriesHelper.cs +++ b/tests/NRedisStack.Tests/TimeSeries/TestAPI/TimeSeriesHelper.cs @@ -7,7 +7,7 @@ public class TimeSeriesHelper { public static RedisResult getInfo(IDatabase db, string key, out int j, out int k) { - var cmd = new SerializedCommand("TS.INFO", key); + var cmd = new SerializedCommand("TS.INFO", (RedisKey)key); RedisResult info = db.Execute(cmd); j = -1;