Skip to content

Commit

Permalink
Merge pull request #74 from pusher/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Jon Elverkilde authored Mar 5, 2021
2 parents 8a1deaa + 42ed09c commit e402f32
Show file tree
Hide file tree
Showing 17 changed files with 82 additions and 200 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 4.4.0
* [REMOVED] PusherServer.Core project
* [FIXED] Use .ConfigureAwait(false) on every await

## 4.3.2
* [CHANGED] Make the GH release task depend tag creation

Expand Down
67 changes: 0 additions & 67 deletions PusherServer.Core/PusherServer.Core.csproj

This file was deleted.

27 changes: 0 additions & 27 deletions PusherServer.Core/PusherServer.nuspec

This file was deleted.

16 changes: 8 additions & 8 deletions PusherServer.Tests/AcceptanceTests/ChannelState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public async Task It_should_return_the_state_asynchronously_When_given_a_channel
var pusherClient = ClientServerFactory.CreateClient(pusherServer, reset, channelName);

var info = new { info = "user_count" };
var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(channelName, info);
var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(channelName, info).ConfigureAwait(false);

reset.Set();

Expand All @@ -38,7 +38,7 @@ public async Task It_should_return_the_state_asynchronously_When_given_a_channel
var pusherServer = ClientServerFactory.CreateServer();
var pusherClient = ClientServerFactory.CreateClient(pusherServer, reset, channelName);

var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(channelName);
var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(channelName).ConfigureAwait(false);

Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
Assert.IsTrue(response.Data.Occupied);
Expand All @@ -56,7 +56,7 @@ public async Task It_should_not_return_the_state_based_asynchronously_When_given

var info = new { info = "does-not-exist" };

var result = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(channelName, info);
var result = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(channelName, info).ConfigureAwait(false);
Assert.AreEqual(HttpStatusCode.BadRequest, result.StatusCode);
StringAssert.IsMatch("info should be a comma separated list of attributes", result.Body);
}
Expand All @@ -72,7 +72,7 @@ public async Task It_should_throw_an_exception_when_given_an_empty_string_as_a_c

try
{
var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(string.Empty, info);
var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(string.Empty, info).ConfigureAwait(false);
}
catch (ArgumentException ex)
{
Expand All @@ -93,7 +93,7 @@ public async Task It_should_throw_an_exception_when_given_a_null_as_a_channel_na

try
{
var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(null, info);
var response = await pusherServer.FetchStateForChannelAsync<ChannelStateMessage>(null, info).ConfigureAwait(false);
}
catch (ArgumentException ex)
{
Expand Down Expand Up @@ -125,7 +125,7 @@ public async Task It_should_return_the_state_asynchronously_When_given_a_channel

var info = new { info = "user_count", filter_by_prefix = "presence-" };

var result = await pusherServer.FetchStateForChannelsAsync<object>(info);
var result = await pusherServer.FetchStateForChannelsAsync<object>(info).ConfigureAwait(false);

reset.Set();

Expand All @@ -144,7 +144,7 @@ public async Task It_should_return_the_state_asynchronously_When_given_a_channel
var pusherServer = ClientServerFactory.CreateServer();
var pusherClient = ClientServerFactory.CreateClient(pusherServer, reset, channelName);

var result = await pusherServer.FetchStateForChannelsAsync<object>();
var result = await pusherServer.FetchStateForChannelsAsync<object>().ConfigureAwait(false);

reset.Set();

Expand All @@ -163,7 +163,7 @@ public async Task It_should_not_return_the_state_asynchronously_based_When_given

var info = new { info = "does-not-exist" };

var result = await pusherServer.FetchStateForChannelsAsync<object>(info);
var result = await pusherServer.FetchStateForChannelsAsync<object>(info).ConfigureAwait(false);

reset.Set();

Expand Down
6 changes: 3 additions & 3 deletions PusherServer.Tests/AcceptanceTests/Get.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public async Task It_should_return_a_200_response()
HostName = Config.HttpHost
});

IGetResult<object> result = await pusher.GetAsync<object>("/channels");
IGetResult<object> result = await pusher.GetAsync<object>("/channels").ConfigureAwait(false);

Assert.AreEqual(HttpStatusCode.OK, result.StatusCode);
}
Expand All @@ -35,7 +35,7 @@ public async Task It_should_be_possible_to_deserialize_the_request_result_body_a
HostName = Config.HttpHost
});

IGetResult<object> result = await pusher.GetAsync<object>("/channels");
IGetResult<object> result = await pusher.GetAsync<object>("/channels").ConfigureAwait(false);

Assert.NotNull(result.Data);
}
Expand All @@ -48,7 +48,7 @@ public async Task It_should_be_possible_to_deserialize_the_a_channels_result_bod
HostName = Config.HttpHost
});

IGetResult<ChannelsList> result = await pusher.GetAsync<ChannelsList>("/channels");
IGetResult<ChannelsList> result = await pusher.GetAsync<ChannelsList>("/channels").ConfigureAwait(false);

Assert.IsTrue(result.Data.Channels.Count >= 0);
}
Expand Down
10 changes: 5 additions & 5 deletions PusherServer.Tests/AcceptanceTests/PresenceChannels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public async Task Should_get_a_list_of_subscribed_users_asynchronously_when_usin
var pusherServer = ClientServerFactory.CreateServer();
var pusherClient = ClientServerFactory.CreateClient(pusherServer, reset, channelName);

IGetResult<PresenceChannelMessage> result = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(channelName);
IGetResult<PresenceChannelMessage> result = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(channelName).ConfigureAwait(false);

reset.Set();

Expand All @@ -38,7 +38,7 @@ public async Task Should_get_an_empty_list_of_subscribed_users_asynchronously_wh

var pusherServer = ClientServerFactory.CreateServer();

IGetResult<PresenceChannelMessage> result = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(channelName);
IGetResult<PresenceChannelMessage> result = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(channelName).ConfigureAwait(false);

reset.Set();

Expand All @@ -56,7 +56,7 @@ public async Task should_return_bad_request_asynchronously_using_an_incorrect_ch
var pusherServer = ClientServerFactory.CreateServer();
var pusherClient = ClientServerFactory.CreateClient(pusherServer, reset, channelName);

IGetResult<PresenceChannelMessage> result = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>("test-channel-async");
IGetResult<PresenceChannelMessage> result = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>("test-channel-async").ConfigureAwait(false);

reset.Set();

Expand All @@ -74,7 +74,7 @@ public async Task should_throw_an_exception_when_given_a_null_for_a_channel_name

try
{
var response = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(null);
var response = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(null).ConfigureAwait(false);
reset.Set();
}
catch (ArgumentException ex)
Expand All @@ -97,7 +97,7 @@ public async Task should_throw_an_exception_when_given_an_empty_string_for_a_cha

try
{
var response = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(string.Empty);
var response = await pusherServer.FetchUsersFromPresenceChannelAsync<PresenceChannelMessage>(string.Empty).ConfigureAwait(false);
reset.Set();
}
catch (ArgumentException ex)
Expand Down
Loading

0 comments on commit e402f32

Please sign in to comment.