Skip to content

Commit 19dad85

Browse files
authored
fix failing doc tests by avoiding parallelization at assembly level (#326)
* fix failing doc tests by avoiding parallelization at assembly level * disable tests failing around FT.CONFIG response
1 parent cd981b2 commit 19dad85

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

.github/workflows/reusable.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
echo "${{secrets.REDIS_CA_PEM}}" > tests/NRedisStack.Tests/bin/Debug/${{inputs.clr_version}}/redis_ca.pem
7171
echo "${{secrets.REDIS_USER_CRT}}" > tests/NRedisStack.Tests/bin/Debug/${{inputs.clr_version}}/redis_user.crt
7272
echo "${{secrets.REDIS_USER_PRIVATE_KEY}}" > tests/NRedisStack.Tests/bin/Debug/${{inputs.clr_version}}/redis_user_private.key
73-
dotnet test -f ${{inputs.clr_version}} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
73+
dotnet test -f ${{inputs.clr_version}} --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover -p:BuildInParallel=false tests/Test.proj
7474
- name: Codecov
7575
uses: codecov/codecov-action@v3
7676
with:

tests/NRedisStack.Tests/Search/SearchTests.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,8 @@ public async Task AlterAddAsync()
822822
Assert.Equal(4, info.CursorStats.Count);
823823
}
824824

825-
[SkipIfRedis(Is.OSSCluster, Is.Enterprise)]
825+
// TODO : fix with FT.CONFIG response change
826+
[SkipIfRedis(Is.OSSCluster, Is.Enterprise, Comparison.GreaterThanOrEqual, "7.3.240")]
826827
public void TestConfig()
827828
{
828829
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -833,7 +834,8 @@ public void TestConfig()
833834
Assert.Equal("100", configMap["TIMEOUT"].ToString());
834835
}
835836

836-
[SkipIfRedis(Is.OSSCluster, Is.Enterprise)]
837+
// TODO : fix with FT.CONFIG response change
838+
[SkipIfRedis(Is.OSSCluster, Is.Enterprise, Comparison.GreaterThanOrEqual, "7.3.240")]
837839
public async Task TestConfigAsnyc()
838840
{
839841
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -844,7 +846,8 @@ public async Task TestConfigAsnyc()
844846
Assert.Equal("100", configMap["TIMEOUT"].ToString());
845847
}
846848

847-
[SkipIfRedis(Is.OSSCluster, Is.Enterprise)]
849+
// TODO : fix with FT.CONFIG response change
850+
[SkipIfRedis(Is.OSSCluster, Is.Enterprise, Comparison.GreaterThanOrEqual, "7.3.240")]
848851
public void configOnTimeout()
849852
{
850853
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -856,7 +859,8 @@ public void configOnTimeout()
856859
try { ft.ConfigSet("ON_TIMEOUT", "null"); } catch (RedisServerException) { }
857860
}
858861

859-
[SkipIfRedis(Is.OSSCluster, Is.Enterprise)]
862+
// TODO : fix with FT.CONFIG response change
863+
[SkipIfRedis(Is.OSSCluster, Is.Enterprise, Comparison.GreaterThanOrEqual, "7.3.240")]
860864
public async Task configOnTimeoutAsync()
861865
{
862866
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -868,7 +872,8 @@ public async Task configOnTimeoutAsync()
868872
try { ft.ConfigSet("ON_TIMEOUT", "null"); } catch (RedisServerException) { }
869873
}
870874

871-
[SkipIfRedis(Is.OSSCluster, Is.Enterprise)]
875+
// TODO : fix with FT.CONFIG response change
876+
[SkipIfRedis(Is.OSSCluster, Is.Enterprise, Comparison.GreaterThanOrEqual, "7.3.240")]
872877
public void TestDialectConfig()
873878
{
874879
IDatabase db = redisFixture.Redis.GetDatabase();
@@ -890,7 +895,8 @@ public void TestDialectConfig()
890895
Assert.True(ft.ConfigSet("DEFAULT_DIALECT", "1"));
891896
}
892897

893-
[SkipIfRedis(Is.OSSCluster, Is.Enterprise)]
898+
// TODO : fix with FT.CONFIG response change
899+
[SkipIfRedis(Is.OSSCluster, Is.Enterprise, Comparison.GreaterThanOrEqual, "7.3.240")]
894900
public async Task TestDialectConfigAsync()
895901
{
896902
IDatabase db = redisFixture.Redis.GetDatabase();

tests/Test.proj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project Sdk="Microsoft.Build.Traversal/2.0.24">
2+
<ItemGroup>
3+
<ProjectReference Include="**\*.*proj" />
4+
</ItemGroup>
5+
</Project>

0 commit comments

Comments
 (0)