@@ -12,7 +12,7 @@ namespace StackExchange.Redis.Tests
12
12
public class MultiMaster : TestBase
13
13
{
14
14
protected override string GetConfiguration ( ) =>
15
- TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort + " ," + TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort + ",password=" + TestConfig . Current . SecurePassword ;
15
+ TestConfig . Current . MasterServerAndPort + "," + TestConfig . Current . SecureServerAndPort + ",password=" + TestConfig . Current . SecurePassword ;
16
16
17
17
public MultiMaster ( ITestOutputHelper output ) : base ( output ) { }
18
18
@@ -39,8 +39,8 @@ public async Task DeslaveGoesToPrimary()
39
39
ConfigurationOptions config = GetMasterSlaveConfig ( ) ;
40
40
using ( var conn = ConnectionMultiplexer . Connect ( config ) )
41
41
{
42
- var primary = conn . GetServer ( TestConfig . Current . MasterServer , TestConfig . Current . MasterPort ) ;
43
- var secondary = conn . GetServer ( TestConfig . Current . SlaveServer , TestConfig . Current . SlavePort ) ;
42
+ var primary = conn . GetServer ( TestConfig . Current . MasterServerAndPort ) ;
43
+ var secondary = conn . GetServer ( TestConfig . Current . SlaveServerAndPort ) ;
44
44
45
45
primary . Ping ( ) ;
46
46
secondary . Ping ( ) ;
@@ -58,7 +58,7 @@ public async Task DeslaveGoesToPrimary()
58
58
conn . Configure ( writer ) ;
59
59
string log = writer . ToString ( ) ;
60
60
61
- Assert . True ( log . Contains ( "tie-break is unanimous at " + TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort ) , "unanimous" ) ;
61
+ Assert . True ( log . Contains ( "tie-break is unanimous at " + TestConfig . Current . MasterServerAndPort ) , "unanimous" ) ;
62
62
}
63
63
// k, so we know everyone loves 6379; is that what we get?
64
64
@@ -89,8 +89,8 @@ public async Task DeslaveGoesToPrimary()
89
89
// server topology changes from failures to recognize those changes
90
90
using ( var conn2 = ConnectionMultiplexer . Connect ( config ) )
91
91
{
92
- var primary2 = conn . GetServer ( TestConfig . Current . MasterServer , TestConfig . Current . MasterPort ) ;
93
- var secondary2 = conn . GetServer ( TestConfig . Current . SlaveServer , TestConfig . Current . SlavePort ) ;
92
+ var primary2 = conn . GetServer ( TestConfig . Current . MasterServerAndPort ) ;
93
+ var secondary2 = conn . GetServer ( TestConfig . Current . SlaveServerAndPort ) ;
94
94
95
95
Writer . WriteLine ( $ "Check: { primary2 . EndPoint } : { primary2 . ServerType } , Mode: { ( primary2 . IsSlave ? "Slave" : "Master" ) } ") ;
96
96
Writer . WriteLine ( $ "Check: { secondary2 . EndPoint } : { secondary2 . ServerType } , Mode: { ( secondary2 . IsSlave ? "Slave" : "Master" ) } ") ;
@@ -143,15 +143,15 @@ public void TestMultiNoTieBreak()
143
143
144
144
public static IEnumerable < object [ ] > GetConnections ( )
145
145
{
146
- yield return new object [ ] { TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort } ;
147
- yield return new object [ ] { TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort } ;
148
- yield return new object [ ] { TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort , null } ;
149
- yield return new object [ ] { TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort , null } ;
150
-
151
- yield return new object [ ] { null , TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort } ;
152
- yield return new object [ ] { TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort , null , TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort } ;
153
- yield return new object [ ] { null , TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort , TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort } ;
154
- yield return new object [ ] { TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort , null , TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort } ;
146
+ yield return new object [ ] { TestConfig . Current . MasterServerAndPort , TestConfig . Current . MasterServerAndPort , TestConfig . Current . MasterServerAndPort } ;
147
+ yield return new object [ ] { TestConfig . Current . SecureServerAndPort , TestConfig . Current . SecureServerAndPort , TestConfig . Current . SecureServerAndPort } ;
148
+ yield return new object [ ] { TestConfig . Current . SecureServerAndPort , TestConfig . Current . MasterServerAndPort , null } ;
149
+ yield return new object [ ] { TestConfig . Current . MasterServerAndPort , TestConfig . Current . SecureServerAndPort , null } ;
150
+
151
+ yield return new object [ ] { null , TestConfig . Current . MasterServerAndPort , TestConfig . Current . MasterServerAndPort } ;
152
+ yield return new object [ ] { TestConfig . Current . MasterServerAndPort , null , TestConfig . Current . MasterServerAndPort } ;
153
+ yield return new object [ ] { null , TestConfig . Current . SecureServerAndPort , TestConfig . Current . SecureServerAndPort } ;
154
+ yield return new object [ ] { TestConfig . Current . SecureServerAndPort , null , TestConfig . Current . SecureServerAndPort } ;
155
155
yield return new object [ ] { null , null , null } ;
156
156
}
157
157
@@ -160,11 +160,11 @@ public void TestMultiWithTiebreak(string a, string b, string elected)
160
160
{
161
161
const string TieBreak = "__tie__" ;
162
162
// set the tie-breakers to the expected state
163
- using ( var aConn = ConnectionMultiplexer . Connect ( TestConfig . Current . MasterServer + ":" + TestConfig . Current . MasterPort ) )
163
+ using ( var aConn = ConnectionMultiplexer . Connect ( TestConfig . Current . MasterServerAndPort ) )
164
164
{
165
165
aConn . GetDatabase ( ) . StringSet ( TieBreak , a ) ;
166
166
}
167
- using ( var aConn = ConnectionMultiplexer . Connect ( TestConfig . Current . MasterServer + ":" + TestConfig . Current . SecurePort + ",password=" + TestConfig . Current . SecurePassword ) )
167
+ using ( var aConn = ConnectionMultiplexer . Connect ( TestConfig . Current . SecureServerAndPort + ",password=" + TestConfig . Current . SecurePassword ) )
168
168
{
169
169
aConn . GetDatabase ( ) . StringSet ( TieBreak , b ) ;
170
170
}
0 commit comments