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:
@@ -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);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user