Skip to content

Commit 88a6768

Browse files
author
Pete
committed
Merge branch 'hotfix-1.3.6'
2 parents 8f57265 + af9072c commit 88a6768

24 files changed

+33227
-47
lines changed

src/ServicePulse.Host/Scripts/jquery-1.11.3-vsdoc.js

Lines changed: 6728 additions & 0 deletions
Large diffs are not rendered by default.

src/ServicePulse.Host/Scripts/jquery-1.11.3.js

Lines changed: 10351 additions & 0 deletions
Large diffs are not rendered by default.

src/ServicePulse.Host/Scripts/jquery-1.11.3.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ServicePulse.Host/Scripts/jquery-1.11.3.min.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ServicePulse.Host/app/js/services/services.stream.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
var connection = $jquery.connection(url);
1111

12+
connection.logging = true;
13+
1214
connection.received(function (data) {
1315
for (var i in data.types) {
1416
callSubscribers(data.types[i], data.message);
@@ -50,8 +52,10 @@
5052
var subscriberDictionary = subscriberRegistry[messageType];
5153

5254
for (var key in subscriberDictionary) {
53-
if ($jquery.isFunction(subscriberDictionary[key])) {
54-
subscriberDictionary[key].call(undefined, message);
55+
if (subscriberDictionary.hasOwnProperty(key)) {
56+
if ($jquery.isFunction(subscriberDictionary[key])) {
57+
subscriberDictionary[key].call(undefined, message);
58+
}
5559
}
5660
}
5761
};
@@ -63,7 +67,7 @@
6367

6468
var uniqueKey = registryKey++;
6569

66-
subscriberRegistry[messageType][uniqueKey] = function (event, message) {
70+
subscriberRegistry[messageType][uniqueKey] = function (message) {
6771
handler(message);
6872
};
6973

src/ServicePulse.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmokeTest.3rdParty", "Smoke
2828
EndProject
2929
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmokeTest.Shared", "SmokeTest.Shared\SmokeTest.Shared.csproj", "{122AD54A-B249-41C7-858F-CB75E7C0F463}"
3030
EndProject
31+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmokeTest.SignalrClient", "SmokeTest.SignalrClient\SmokeTest.SignalrClient.csproj", "{C23C4E96-744E-49F6-A4AB-9324E43A166A}"
32+
EndProject
3133
Global
3234
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3335
Debug|Any CPU = Debug|Any CPU
@@ -66,6 +68,10 @@ Global
6668
{122AD54A-B249-41C7-858F-CB75E7C0F463}.Debug|Any CPU.Build.0 = Debug|Any CPU
6769
{122AD54A-B249-41C7-858F-CB75E7C0F463}.Release|Any CPU.ActiveCfg = Release|Any CPU
6870
{122AD54A-B249-41C7-858F-CB75E7C0F463}.Release|Any CPU.Build.0 = Release|Any CPU
71+
{C23C4E96-744E-49F6-A4AB-9324E43A166A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
72+
{C23C4E96-744E-49F6-A4AB-9324E43A166A}.Debug|Any CPU.Build.0 = Debug|Any CPU
73+
{C23C4E96-744E-49F6-A4AB-9324E43A166A}.Release|Any CPU.ActiveCfg = Release|Any CPU
74+
{C23C4E96-744E-49F6-A4AB-9324E43A166A}.Release|Any CPU.Build.0 = Release|Any CPU
6975
EndGlobalSection
7076
GlobalSection(SolutionProperties) = preSolution
7177
HideSolutionNode = FALSE
@@ -76,5 +82,6 @@ Global
7682
{CBC386E8-36FB-4427-A212-88F75C65A6A9} = {E4018B8E-ED2B-464C-B9A7-70BD97448D4B}
7783
{267DA5B2-2F82-4F26-A8B3-E164B226FA98} = {E4018B8E-ED2B-464C-B9A7-70BD97448D4B}
7884
{122AD54A-B249-41C7-858F-CB75E7C0F463} = {E4018B8E-ED2B-464C-B9A7-70BD97448D4B}
85+
{C23C4E96-744E-49F6-A4AB-9324E43A166A} = {E4018B8E-ED2B-464C-B9A7-70BD97448D4B}
7986
EndGlobalSection
8087
EndGlobal

src/SmokeTest.3rdParty/Program.cs

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,61 @@
11
using System;
22
using System.IO;
33
using System.Net;
4+
using System.Xml.Serialization;
5+
6+
47

58
class Program
69
{
710
static bool isReturningOk = true;
811
static HttpListener listener;
912

13+
1014
static void Main()
1115
{
12-
Console.WriteLine("Press enter key to toggle the server to return a error or success");
13-
Console.WriteLine("Press any key to exit");
14-
1516
using (listener = new HttpListener())
1617
{
18+
var exit = false;
1719
listener.Prefixes.Add("http://localhost:57789/");
1820
listener.Start();
1921
listener.BeginGetContext(ListenerCallback, listener);
2022

21-
while (true)
23+
do
2224
{
25+
Console.Clear();
26+
Console.WriteLine("-------------------------------------");
27+
Console.ForegroundColor = isReturningOk ? ConsoleColor.Green : ConsoleColor.Red;
28+
Console.WriteLine("Currently returning {0}!", isReturningOk ? "Success" : "Error");
29+
Console.ForegroundColor = ConsoleColor.White;
30+
Console.WriteLine("-------------------------------------");
31+
Console.WriteLine("[ A ] Return Success");
32+
Console.WriteLine("[ B ] Return Error");
33+
Console.WriteLine("[ Q ] Quit");
34+
Console.WriteLine("-------------------------------------");
35+
Console.Write("Make a Choice: ");
36+
2337
ConsoleKeyInfo key = Console.ReadKey();
2438
Console.WriteLine();
25-
26-
if (key.Key != ConsoleKey.Enter)
39+
switch (key.Key)
2740
{
28-
return;
41+
case ConsoleKey.A:
42+
isReturningOk = true;
43+
break;
44+
case ConsoleKey.B:
45+
isReturningOk = false;
46+
break;
47+
case ConsoleKey.Q:
48+
exit = true;
49+
listener.Close();
50+
break;
51+
default:
52+
Console.WriteLine("Option not valid, Try again.");
53+
break;
2954
}
30-
listener.Close();
31-
if (isReturningOk)
32-
{
33-
Console.WriteLine("\r\nCurrently returning success");
34-
}
35-
else
36-
{
37-
Console.WriteLine("\r\nCurrently returning error");
38-
}
39-
isReturningOk = !isReturningOk;
40-
}
55+
56+
57+
58+
} while (!exit);
4159
}
4260
}
4361

src/SmokeTest.Client/Program.cs

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,43 @@ static void Main()
1919
Console.WriteLine("Press enter to send a message");
2020
Console.WriteLine("Press any key to exit");
2121

22-
while (true)
22+
23+
var exit = false;
24+
var emulateFailures = false;
25+
var count = 1;
26+
do
2327
{
24-
var killMe = false;
25-
var count = 1;
28+
Console.ForegroundColor = ConsoleColor.White;
29+
Console.WriteLine("-------------------------------------");
30+
Console.WriteLine("[ A ] Send 1 good Message");
31+
Console.WriteLine("[ B ] Send 10 bad Messages");
32+
Console.WriteLine("[ Q ] Quit");
33+
Console.WriteLine("-------------------------------------");
34+
Console.Write("Make a Choice: ");
2635

2736
var key = Console.ReadKey();
37+
Console.WriteLine();
2838
switch (key.Key)
2939
{
30-
case ConsoleKey.Enter:
31-
killMe = true;
32-
count = 10;
40+
case ConsoleKey.A:
41+
emulateFailures = false;
42+
count = 1;
3343
break;
34-
case ConsoleKey.Spacebar:
35-
killMe = true;
44+
case ConsoleKey.B:
45+
emulateFailures = true;
46+
count = 10;
3647
break;
3748
case ConsoleKey.Q:
38-
return;
49+
exit = true;
50+
break;
51+
default:
52+
Console.WriteLine("Option not valid, Try again.");
53+
continue;
54+
3955
}
4056

57+
Console.ForegroundColor = ConsoleColor.Gray;
58+
4159
var text = wordblob.LoremIpsum(5, 5, 1, 1, 1);
4260
for (var i = 0; i < count; i++)
4361
{
@@ -46,14 +64,14 @@ static void Main()
4664
bus.Send("SmokeTest.Server", new MyMessage
4765
{
4866
Id = id,
49-
KillMe = killMe,
67+
KillMe = emulateFailures,
5068
SomeText = text
5169
});
5270

5371
Console.WriteLine("Sent a new message with id: {0}", id.ToString("N"));
5472
}
55-
56-
}
73+
74+
} while (!exit);
5775
}
5876
}
5977
}

src/SmokeTest.Server/Monitor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ abstract class Monitor : PeriodicCheck
99
static ILog logger = LogManager.GetLogger<Monitor>();
1010

1111
protected Monitor(Uri uri, TimeSpan interval)
12-
: base(string.Format("Monitor {0}", uri), "Monitor 3rd Party ", interval)
12+
: base($"Monitor {uri}", "Monitor 3rd Party ", interval)
1313
{
1414
this.uri = uri;
1515
}
@@ -29,14 +29,14 @@ public override CheckResult PerformCheck()
2929
logger.InfoFormat("Succeeded in contacting {0}", uri);
3030
return CheckResult.Pass;
3131
}
32-
string error = string.Format("Failed to contact '{0}'. HttpStatusCode: {1}", uri, response.StatusCode);
32+
string error = $"Failed to contact '{uri}'. HttpStatusCode: {response.StatusCode}";
3333
logger.Info(error);
3434
return CheckResult.Failed(error);
3535
}
3636
}
3737
catch (Exception exception)
3838
{
39-
string error = string.Format("Failed to contact '{0}'. Error: {1}", uri, exception.Message);
39+
string error = $"Failed to contact '{uri}'. Error: {exception.Message}";
4040
logger.Info(error);
4141
return CheckResult.Failed(error);
4242
}

src/SmokeTest.Server/MyHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public void Handle(MyMessage message)
1212
return;
1313
}
1414

15-
if (!Program.KillMe)
15+
if (!Program.emulateFailures)
1616
{
1717
return;
1818
}

0 commit comments

Comments
 (0)