Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Realtime/Realtime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Websocket.Client" Version="4.7.0" />
<PackageReference Include="Websocket.Client" Version="5.5.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Websocket.Client" Version="5.1.1" />
<PackageReference Include="Websocket.Client" Version="5.5.0" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions Realtime/RealtimeSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
using Supabase.Realtime.Interfaces;
using Websocket.Client;
using static Supabase.Realtime.Constants;
#if NETSTANDARD2_0
using Websocket.Client.Models;
#endif

namespace Supabase.Realtime;
/// <summary>
Expand Down Expand Up @@ -429,7 +426,7 @@
/// <param name="args"></param>
private void HandleSocketMessage(ResponseMessage args)
{
_options.Decode!(args.Text, decoded =>

Check warning on line 429 in Realtime/RealtimeSocket.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Possible null reference argument for parameter 'arg1' in 'void Action<string, Action<SocketResponse?>>.Invoke(string arg1, Action<SocketResponse?> arg2)'.

Check warning on line 429 in Realtime/RealtimeSocket.cs

View workflow job for this annotation

GitHub Actions / build-and-test

Possible null reference argument for parameter 'arg1' in 'void Action<string, Action<SocketResponse?>>.Invoke(string arg1, Action<SocketResponse?> arg2)'.
{
Debugger.Instance.Log(this, $"Socket Message Received:\n\t{args.Text}");

Expand Down
8 changes: 4 additions & 4 deletions RealtimeTests/ClientFailureTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public async Task ClientThrowsExceptionOnInitialConnectionFailure()
client.AddDebugHandler((_, message, _) => Debug.WriteLine($"Client 1: {message}"));
client2.AddDebugHandler((_, message, _) => Debug.WriteLine($"Client 2: {message}"));

await Assert.ThrowsExceptionAsync<RealtimeException>(async () => { await client.ConnectAsync(); });
await Assert.ThrowsAsync<RealtimeException>(async () => { await client.ConnectAsync(); });

await Assert.ThrowsExceptionAsync<RealtimeException>(() =>
await Assert.ThrowsAsync<RealtimeException>(() =>
{
var tsc = new TaskCompletionSource();

Expand All @@ -39,9 +39,9 @@ public async Task ClientShouldAllowForMultipleSocketConnectionAttempts()
client.AddDebugHandler((_, message, _) => Debug.WriteLine(message));

// Should throw first time and clear socket instance.
await Assert.ThrowsExceptionAsync<RealtimeException>(client.ConnectAsync);
await Assert.ThrowsAsync<RealtimeException>(client.ConnectAsync);

// Should throw again, as socket is still cleared (as opposed to merely logging).
await Assert.ThrowsExceptionAsync<RealtimeException>(client.ConnectAsync);
await Assert.ThrowsAsync<RealtimeException>(client.ConnectAsync);
}
}
2 changes: 1 addition & 1 deletion RealtimeTests/ClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public async Task ClientJoinsChannel_DB_Schema()
public async Task ClientJoinsChannel_DB_Schema_Table()
{
var channel = client!.Channel("realtime", "public", "users");
await Assert.ThrowsExceptionAsync<RealtimeException>(() => channel.Subscribe());
await Assert.ThrowsAsync<RealtimeException>(() => channel.Subscribe());

var channel2 = client!.Channel("realtime", "public", "todos");
await channel2.Subscribe();
Expand Down
8 changes: 4 additions & 4 deletions RealtimeTests/RealtimeTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.8.1" />
<PackageReference Include="MSTest.TestAdapter" Version="4.3.2" />
<PackageReference Include="MSTest.TestFramework" Version="4.3.2" />
<PackageReference Include="coverlet.collector" Version="10.0.1">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Loading