Skip to content

Commit 170bbca

Browse files
committed
Tests: add DeslaveGoesToPrimary logging
1 parent 95271bb commit 170bbca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

StackExchange.Redis.Tests/MultiMaster.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,16 @@ public async Task DeslaveGoesToPrimary()
7171

7272
var ex = Assert.Throws<RedisConnectionException>(() => db.IdentifyEndpoint(key, CommandFlags.DemandSlave));
7373
Assert.StartsWith("No connection is available to service this operation: EXISTS DeslaveGoesToPrimary", ex.Message);
74-
74+
Writer.WriteLine("Invoking MakeMaster()...");
7575
primary.MakeMaster(ReplicationChangeOptions.Broadcast | ReplicationChangeOptions.EnslaveSubordinates | ReplicationChangeOptions.SetTiebreaker, Writer);
76+
Writer.WriteLine("Finished MakeMaster() call.");
7677

7778
await Task.Delay(2000).ConfigureAwait(false);
7879

80+
Writer.WriteLine("Invoking Ping() (post-master)");
7981
primary.Ping();
8082
secondary.Ping();
83+
Writer.WriteLine("Finished Ping() (post-master)");
8184

8285
Assert.True(primary.IsConnected, $"{primary.EndPoint} is not connected.");
8386
Assert.True(secondary.IsConnected, $"{secondary.EndPoint} is not connected.");
@@ -87,6 +90,7 @@ public async Task DeslaveGoesToPrimary()
8790

8891
// Create a separate multiplexer with a valid view of the world to distinguish between failures of
8992
// server topology changes from failures to recognize those changes
93+
Writer.WriteLine("Connecting to secondary validation connection.");
9094
using (var conn2 = ConnectionMultiplexer.Connect(config))
9195
{
9296
var primary2 = conn.GetServer(TestConfig.Current.MasterServerAndPort);

0 commit comments

Comments
 (0)