Skip to content

Commit

Permalink
Remove Google's connection test to avoid Google being blocked by SNI …
Browse files Browse the repository at this point in the history
…in certain areas.
  • Loading branch information
xljiulang committed Dec 6, 2024
1 parent 146b161 commit 83148ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/MQTTnet.Tests/Internal/CrossPlatformSocket_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public class CrossPlatformSocket_Tests
public async Task Connect_Send_Receive()
{
var crossPlatformSocket = new CrossPlatformSocket(ProtocolType.Tcp);
await crossPlatformSocket.ConnectAsync(new DnsEndPoint("www.google.de", 80), CancellationToken.None);
await crossPlatformSocket.ConnectAsync(new DnsEndPoint("www.microsoft.com", 80), CancellationToken.None);

var requestBuffer = Encoding.UTF8.GetBytes("GET / HTTP/1.1\r\nHost: www.google.de\r\n\r\n");
var requestBuffer = Encoding.UTF8.GetBytes("GET / HTTP/1.1\r\nHost: www.microsoft.com\r\n\r\n");
await crossPlatformSocket.SendAsync(new ArraySegment<byte>(requestBuffer), System.Net.Sockets.SocketFlags.None);

var buffer = new byte[1024];
Expand All @@ -31,7 +31,7 @@ public async Task Connect_Send_Receive()

var responseText = Encoding.UTF8.GetString(buffer, 0, length);

Assert.IsTrue(responseText.Contains("HTTP/1.1 200 OK"));
Assert.IsTrue(responseText.Contains("HTTP/1.1 200")|| responseText.Contains("HTTP/1.1 302"));
}

[TestMethod]
Expand Down

0 comments on commit 83148ca

Please sign in to comment.