Skip to content

Commit aa3c76d

Browse files
authored
Remove test for default port, as it's required by gRPC channel (#156)
* Remove test for default port, as it's required by gRPC channel * Https is OK
1 parent 738fd67 commit aa3c76d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dotnet/Trinsic.Tests/Tests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.IO;
33
using System.Runtime.CompilerServices;
44
using System.Threading.Tasks;
@@ -35,9 +35,9 @@ public void TestParseURL()
3535
{
3636
Assert.Throws<UriFormatException>(() => ServiceBase.CreateChannelIfNeeded("localhost"));
3737
Assert.Throws<ArgumentException>(() => ServiceBase.CreateChannelIfNeeded("localhost:5000"));
38-
Assert.Throws<ArgumentException>(() => ServiceBase.CreateChannelIfNeeded("http://localhost"));
38+
// Assert.Throws<ArgumentException>(() => ServiceBase.CreateChannelIfNeeded("http://localhost"));
3939
// Throws because HTTPS is not yet supported.
40-
Assert.Throws<ArgumentException>(() => ServiceBase.CreateChannelIfNeeded("https://localhost:5000"));
40+
// Assert.Throws<ArgumentException>(() => ServiceBase.CreateChannelIfNeeded("https://localhost:5000"));
4141

4242
Assert.NotNull(ServiceBase.CreateChannelIfNeeded("http://localhost:5000"));
4343

dotnet/Trinsic/ServiceBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public void SetProfile(WalletProfile profile)
6565
public static GrpcChannel CreateChannelIfNeeded(string serviceAddress)
6666
{
6767
var url = new Uri(serviceAddress);
68-
if (url.IsDefaultPort) throw new ArgumentException("GRPC Port and scheme required");
68+
//if (url.IsDefaultPort) throw new ArgumentException("GRPC Port and scheme required");
6969
if ("https".Equals(url.Scheme)) throw new ArgumentException("HTTPS not yet supported");
7070
return GrpcChannel.ForAddress(serviceAddress, new GrpcChannelOptions());
7171
}

0 commit comments

Comments
 (0)