-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: catcherwong <[email protected]>
- Loading branch information
1 parent
7887675
commit a8a8e32
Showing
10 changed files
with
46 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using RDBParser; | ||
using System.Text; | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace RDBParserTests | ||
{ | ||
public class ClusterTests | ||
{ | ||
private ITestOutputHelper _output; | ||
|
||
public ClusterTests(ITestOutputHelper output) | ||
{ | ||
this._output = output; | ||
} | ||
|
||
[Fact] | ||
public void TestSoltInfo() | ||
{ | ||
// set mykey v1 | ||
// bgsave | ||
var path = TestHelper.GetRDBPath("redis74_cluster_slotinfo.rdb"); | ||
|
||
var callback = new TestReaderCallback(_output); | ||
var parser = new BinaryReaderRDBParser(callback); | ||
parser.Parse(path); | ||
|
||
var infos = callback.GetInfos(); | ||
|
||
Assert.Equal(1165, (int)infos[0][Encoding.UTF8.GetBytes("key{v1}")].SlotId); | ||
Assert.Equal(2589, (int)infos[0][Encoding.UTF8.GetBytes("key{v12}")].SlotId); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.