Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
StackExchange.Redis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
StackExchange.Redis
Commits
c7858415
Commit
c7858415
authored
Aug 08, 2018
by
Marc Gravell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate.Basic... you're nothing but trouble
parent
37303713
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Migrate.cs
StackExchange.Redis.Tests/Migrate.cs
+6
-1
No files found.
StackExchange.Redis.Tests/Migrate.cs
View file @
c7858415
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Xunit
;
using
Xunit
;
using
Xunit.Abstractions
;
using
Xunit.Abstractions
;
...
@@ -9,7 +10,7 @@ public class Migrate : TestBase
...
@@ -9,7 +10,7 @@ public class Migrate : TestBase
public
Migrate
(
ITestOutputHelper
output
)
:
base
(
output
)
{
}
public
Migrate
(
ITestOutputHelper
output
)
:
base
(
output
)
{
}
[
Fact
]
[
Fact
]
public
void
Basic
()
public
async
Task
Basic
()
{
{
var
fromConfig
=
new
ConfigurationOptions
{
EndPoints
=
{
{
TestConfig
.
Current
.
SecureServer
,
TestConfig
.
Current
.
SecurePort
}
},
Password
=
TestConfig
.
Current
.
SecurePassword
};
var
fromConfig
=
new
ConfigurationOptions
{
EndPoints
=
{
{
TestConfig
.
Current
.
SecureServer
,
TestConfig
.
Current
.
SecurePort
}
},
Password
=
TestConfig
.
Current
.
SecurePassword
};
var
toConfig
=
new
ConfigurationOptions
{
EndPoints
=
{
{
TestConfig
.
Current
.
MasterServer
,
TestConfig
.
Current
.
MasterPort
}
}
};
var
toConfig
=
new
ConfigurationOptions
{
EndPoints
=
{
{
TestConfig
.
Current
.
MasterServer
,
TestConfig
.
Current
.
MasterPort
}
}
};
...
@@ -24,6 +25,10 @@ public void Basic()
...
@@ -24,6 +25,10 @@ public void Basic()
fromDb
.
StringSet
(
key
,
"foo"
,
flags
:
CommandFlags
.
FireAndForget
);
fromDb
.
StringSet
(
key
,
"foo"
,
flags
:
CommandFlags
.
FireAndForget
);
var
dest
=
to
.
GetEndPoints
(
true
).
Single
();
var
dest
=
to
.
GetEndPoints
(
true
).
Single
();
fromDb
.
KeyMigrate
(
key
,
dest
);
fromDb
.
KeyMigrate
(
key
,
dest
);
await
Task
.
Delay
(
1000
);
// this is *meant* to be synchronous at the redis level, but
// we keep seeing it fail on the CI server where the key has *left* the origin, but
// has *not* yet arrived at the destination; adding a pause while we investigate with
// the redis folks
Assert
.
False
(
fromDb
.
KeyExists
(
key
));
Assert
.
False
(
fromDb
.
KeyExists
(
key
));
Assert
.
True
(
toDb
.
KeyExists
(
key
));
Assert
.
True
(
toDb
.
KeyExists
(
key
));
string
s
=
toDb
.
StringGet
(
key
);
string
s
=
toDb
.
StringGet
(
key
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment