Commit c7858415 authored by Marc Gravell's avatar Marc Gravell

Migrate.Basic... you're nothing but trouble

parent 37303713
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment