Test exception type expected for .NET Standard 2.0 (#389)

* different exception type expected for 2.0

* remove net452 as tests cannot run for Framework

* Eliminate build target in test. Use common type.
This commit is contained in:
Tyler Jensen
2020-04-03 14:21:51 -06:00
committed by GitHub
parent 3e94068d43
commit 4e1c9bd20c

View File

@@ -772,13 +772,11 @@ namespace k8s.Tests
var cts = new CancellationTokenSource();
cts.CancelAfter(TimeSpan.FromSeconds(2));
await Assert.ThrowsAnyAsync<TaskCanceledException>(async () =>
await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
{
await client.ListNamespacedPodWithHttpMessagesAsync("default", watch: true, cancellationToken: cts.Token);
});
}
}
}
}