Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 0e79417

Browse files
committed
Upgrade to latest gcloud ips for sentinel
1 parent fa53953 commit 0e79417

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ obj/
3434
_ReSharper*/
3535
[Tt]est[Rr]esult*
3636
App_Data/
37+
.vs/
3738

3839
NuGet/
3940
NuGet.Signed/
-199 KB
Binary file not shown.

tests/Console.Tests/GoogleRedisSentinelFailoverTests.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ namespace ConsoleTests
44
{
55
public class GoogleRedisSentinelFailoverTests : RedisSentinelFailoverTests
66
{
7+
//gcloud compute instances list
8+
//url: https://cloud.google.com/sdk/gcloud/reference/compute/instances/list
79
public static string[] SentinelHosts = new[]
810
{
9-
"146.148.77.31",
10-
"130.211.139.141",
11-
"107.178.218.53",
11+
"130.211.149.172",
12+
"130.211.191.163",
13+
"146.148.61.165",
1214
};
1315

1416
protected override RedisSentinel CreateSentinel()
@@ -17,9 +19,9 @@ protected override RedisSentinel CreateSentinel()
1719
{
1820
IpAddressMap =
1921
{
20-
{"10.240.34.152", "146.148.77.31"},
21-
{"10.240.203.193", "130.211.139.141"},
22-
{"10.240.209.52", "107.178.218.53"},
22+
{"10.240.109.243", "130.211.149.172"},
23+
{"10.240.201.29", "130.211.191.163"},
24+
{"10.240.200.252", "146.148.61.165"},
2325
}
2426
};
2527
return sentinel;

tests/Console.Tests/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ static void Main(string[] args)
1919
//new HashStressTest().Execute("10.0.0.9");
2020
//new HashCollectionStressTests().Execute("10.0.0.9", noOfThreads: 64);
2121

22-
new LocalRedisSentinelFailoverTests().Execute();
22+
//new LocalRedisSentinelFailoverTests().Execute();
2323
//new LocalRedisSentinelFailoverTests { StartAndStopRedisServers = false }.Execute();
2424
//new LocalRedisSentinelFailoverTests {
2525
// UseRedisManagerPool = true, StartAndStopRedisServers = false }.Execute();
2626

27-
//new GoogleRedisSentinelFailoverTests().Execute();
27+
new GoogleRedisSentinelFailoverTests().Execute();
2828
}
2929
}
3030
}

tests/ServiceStack.Redis.Tests.Sentinel/Redis3SentinelSetupTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ public void Can_connect_to_3SentinelSetup()
1818
{
1919
client.FlushAll();
2020

21-
client.SetEntry("Sentinel3Setup", "IntranetSentinel");
21+
client.SetValue("Sentinel3Setup", "IntranetSentinel");
2222

23-
var result = client.GetEntry("Sentinel3Setup");
23+
var result = client.GetValue("Sentinel3Setup");
2424
Assert.That(result, Is.EqualTo("IntranetSentinel"));
2525
}
2626
}

tests/ServiceStack.Redis.Tests/Integration/RedisRegressionTestRun.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public void Can_run_series_of_operations_sequentially()
7373

7474
private static void UseClientAsync(IRedisClientsManager manager, int clientNo)
7575
{
76-
using (var client = manager.GetReadOnlyClient())
76+
using (var client = manager.GetClient())
7777
{
7878
UseClient(client, clientNo);
7979
}
@@ -87,15 +87,15 @@ private static void UseClient(IRedisClient client, int clientNo)
8787
{
8888
host = client.Host;
8989

90-
Debug.WriteLine(String.Format("Client '{0}' is using '{1}'", clientNo, client.Host));
90+
Debug.WriteLine(string.Format("Client '{0}' is using '{1}'", clientNo, client.Host));
9191
var differentDbs = new[] { 1, 0, 2 };
9292

9393
foreach (var db in differentDbs)
9494
{
9595
client.Db = db;
9696

9797
var testClientKey = "test:" + host + ":" + clientNo;
98-
client.SetEntry(testClientKey, testData);
98+
client.SetValue(testClientKey, testData);
9999
var result = client.GetValue(testClientKey) ?? "";
100100
LogResult(db, testClientKey, result);
101101

@@ -108,7 +108,6 @@ private static void UseClient(IRedisClient client, int clientNo)
108108
client.AddItemToList(testClientListKey, testData);
109109
var resultList = client.GetAllItemsFromList(testClientListKey);
110110
LogResult(db, testClientKey, resultList.FirstOrDefault());
111-
112111
}
113112
}
114113
catch (NullReferenceException ex)
@@ -118,7 +117,7 @@ private static void UseClient(IRedisClient client, int clientNo)
118117
}
119118
catch (Exception ex)
120119
{
121-
Debug.WriteLine(String.Format("\t[ERROR@{0}]: {1} => {2}",
120+
Debug.WriteLine(string.Format("\t[ERROR@{0}]: {1} => {2}",
122121
host, ex.GetType().Name, ex));
123122
Assert.Fail("Exception");
124123
}

tests/ServiceStack.Redis.Tests/PooledRedisClientManagerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,8 +417,8 @@ public void Can_support_64_threads_using_the_client_simultaneously()
417417
var hostCount = 0;
418418
foreach (var entry in clientUsageMap)
419419
{
420-
Assert.That(entry.Value, Is.GreaterThanOrEqualTo(2), "Host has unproportianate distrobution: " + entry.Value);
421-
Assert.That(entry.Value, Is.LessThanOrEqualTo(30), "Host has unproportianate distrobution: " + entry.Value);
420+
Assert.That(entry.Value, Is.GreaterThanOrEqualTo(2), "Host has unproportianate distribution: " + entry.Value);
421+
Assert.That(entry.Value, Is.LessThanOrEqualTo(30), "Host has unproportianate distribution: " + entry.Value);
422422
hostCount += entry.Value;
423423
}
424424

0 commit comments

Comments
 (0)