Skip to content

Commit

Permalink
test: .Net Core 21
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider authored Aug 16, 2018
1 parent 9bd6908 commit 02a4549
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 29 deletions.
16 changes: 16 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,25 @@ jobs:
- run: dotnet restore
- run: dotnet build ./src/Mdns.csproj -c Release --framework netstandard2
- run: dotnet test ./test/MdnsTests.csproj -c Release --framework netcoreapp2

dotnet21:
working_directory: /temp
docker:
- image: microsoft/dotnet:sdk
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- run: cat /etc/os-release
- run: dotnet --info
- checkout
- run: dotnet restore
- run: dotnet build ./src/Mdns.csproj -c Release --framework netstandard2
- run: dotnet test ./test/MdnsTests.csproj -c Release --framework netcoreapp2.1
workflows:
version: 2
build-all:
jobs:
- dotnet21
- dotnet2
- dotnet1
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: csharp
mono: none
dotnet: 2.0.0
dotnet: 2.1.300
dist: trusty
sudo: required
os:
Expand All @@ -13,3 +13,4 @@ install:
script:
- dotnet build -c Release --no-restore --framework netstandard2 ./src
- dotnet test -c Release --no-restore --framework netcoreapp2 ./test
- dotnet test -c Release --no-restore --framework netcoreapp2.1 ./test
4 changes: 2 additions & 2 deletions Spike/Spike.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pull_requests:

before_build:
- nuget restore
- ps: gitversion /output buildserver /updateAssemblyInfo >gitversion.log
- ps: gitversion /output buildserver

build_script:
- dotnet build -c %CONFIGURATION% -p:Version=%GitVersion_MajorMinorPatch% -p:AssemblyVersion=%GitVersion_MajorMinorPatch%
Expand Down
2 changes: 1 addition & 1 deletion test/MdnsTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netcoreapp2;netcoreapp1.1</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2;netcoreapp2.1;netcoreapp1.1</TargetFrameworks>

<IsPackable>false</IsPackable>
<DebugType>full</DebugType>
Expand Down
24 changes: 0 additions & 24 deletions test/MulticastServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,6 @@ public void SendQuery()
}
}

[TestMethod]
public void SendNonQuery()
{
var query = new Message
{
Opcode = MessageOperation.Status,
QR = false
};
var done = new ManualResetEvent(false);

var mdns = new MulticastService();
mdns.NetworkInterfaceDiscovered += (s, e) => mdns.SendQuery(query);
mdns.QueryReceived += (s, e) => done.Set();
try
{
mdns.Start();
Assert.IsFalse(done.WaitOne(TimeSpan.FromSeconds(0.5)), "query was not ignored");
}
finally
{
mdns.Stop();
}
}

[TestMethod]
public void ReceiveAnswer()
{
Expand Down

0 comments on commit 02a4549

Please sign in to comment.