File tree 4 files changed +37
-6
lines changed
4 files changed +37
-6
lines changed Original file line number Diff line number Diff line change 10
10
- ' !/docs/*' # Don't run workflow when files are only in the /docs directory
11
11
12
12
jobs :
13
- build :
14
- name : Ubuntu
13
+ main :
14
+ name : StackExchange.Redis ( Ubuntu)
15
15
runs-on : ubuntu-latest
16
16
steps :
17
17
- name : Checkout code
23
23
run : docker-compose -f docker-compose.yml up -d
24
24
- name : StackExchange.Redis.Tests
25
25
run : dotnet test tests/StackExchange.Redis.Tests/StackExchange.Redis.Tests.csproj -c Release --logger GitHubActions /p:CI=true
26
+ - name : .NET Lib Pack
27
+ run : dotnet pack src/StackExchange.Redis/StackExchange.Redis.csproj --no-build -c Release /p:Packing=true /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true
28
+
29
+ nredisearch :
30
+ name : NRediSearch (Ubuntu)
31
+ runs-on : ubuntu-latest
32
+ services :
33
+ redisearch :
34
+ image : redislabs/redisearch:latest
35
+ ports :
36
+ - 6385:6379
37
+ steps :
38
+ - name : Checkout code
39
+ uses : actions/checkout@v1
40
+ - name : .NET Build
41
+ run : dotnet build Build.csproj -c Release /p:CI=true
26
42
- name : NRedisSearch.Tests
27
43
run : dotnet test tests/NRediSearch.Test/NRediSearch.Test.csproj -c Release --logger GitHubActions /p:CI=true
28
44
- name : .NET Lib Pack
29
- run : dotnet pack Build .csproj --no-build -c Release /p:Packing=true /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true
45
+ run : dotnet pack src/NRediSearch/NRediSearch .csproj --no-build -c Release /p:Packing=true /p:PackageOutputPath=%CD%\.nupkgs /p:CI=true
Original file line number Diff line number Diff line change @@ -300,7 +300,15 @@ public void TestAddHash()
300
300
Db . KeyDelete ( hashKey ) ;
301
301
Db . HashSet ( hashKey , "title" , "hello world" ) ;
302
302
303
- Assert . True ( cl . AddHash ( hashKey , 1 , false ) ) ;
303
+ try
304
+ {
305
+ Assert . True ( cl . AddHash ( hashKey , 1 , false ) ) ;
306
+ }
307
+ catch ( RedisServerException e )
308
+ {
309
+ Assert . StartsWith ( "ERR unknown command `FT.ADDHASH`" , e . Message ) ;
310
+ return ; // Starting from RediSearch 2.0 this command is not supported anymore
311
+ }
304
312
SearchResult res = cl . Search ( new Query ( "hello world" ) . SetVerbatim ( ) ) ;
305
313
Assert . Equal ( 1 , res . TotalResults ) ;
306
314
Assert . Equal ( hashKey , res . Documents [ 0 ] . Id ) ;
Original file line number Diff line number Diff line change 3
3
using System . Runtime . CompilerServices ;
4
4
using StackExchange . Redis ;
5
5
using StackExchange . Redis . Tests ;
6
+ using Xunit ;
6
7
using Xunit . Abstractions ;
7
8
8
9
namespace NRediSearch . Test
9
10
{
11
+ [ Collection ( nameof ( NonParallelCollection ) ) ]
10
12
public abstract class RediSearchTestBase : IDisposable
11
13
{
12
14
protected readonly ITestOutputHelper Output ;
@@ -15,6 +17,8 @@ protected RediSearchTestBase(ITestOutputHelper output)
15
17
muxer = GetWithFT ( output ) ;
16
18
Output = output ;
17
19
Db = muxer . GetDatabase ( ) ;
20
+ var server = muxer . GetServer ( muxer . GetEndPoints ( ) [ 0 ] ) ;
21
+ server . FlushDatabase ( ) ;
18
22
}
19
23
private ConnectionMultiplexer muxer ;
20
24
protected IDatabase Db { get ; private set ; }
@@ -155,4 +159,7 @@ protected bool IsMissingIndexException(Exception ex)
155
159
|| ex . Message . Contains ( "no such index" , StringComparison . InvariantCultureIgnoreCase ) ;
156
160
}
157
161
}
162
+
163
+ [ CollectionDefinition ( nameof ( NonParallelCollection ) , DisableParallelization = true ) ]
164
+ public class NonParallelCollection { }
158
165
}
Original file line number Diff line number Diff line change 1
- version : ' 2.4 '
1
+ version : ' 2.5 '
2
2
3
3
services :
4
4
redisearch :
5
- image : redislabs/redisearch
5
+ image : redislabs/redisearch:latest
6
6
ports :
7
7
- 6385:6379
8
8
redis :
You can’t perform that action at this time.
0 commit comments