summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2022-02-03 01:00:31 +0100
committerJens Geyer <jensg@apache.org>2022-02-03 22:27:15 +0100
commitb9fe9c2417f26fa6e1d9383b8fa9d50ff9a96d65 (patch)
tree42d3dadf340f5889c27ee239e592a9d22fbab061
parentf087ec48a2d043a93db36dfa44b69785b5dff1e2 (diff)
downloadthrift-b9fe9c2417f26fa6e1d9383b8fa9d50ff9a96d65.tar.gz
FIX: test left too early on false premise
-rw-r--r--test/netstd/Client/Performance/PerformanceTests.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/netstd/Client/Performance/PerformanceTests.cs b/test/netstd/Client/Performance/PerformanceTests.cs
index c1f00ddf8..6ac3aed86 100644
--- a/test/netstd/Client/Performance/PerformanceTests.cs
+++ b/test/netstd/Client/Performance/PerformanceTests.cs
@@ -132,10 +132,12 @@ namespace Client.Tests
{
var stop = new Stopwatch();
- if ((Testdata is null) || (Transport is null))
+ if (Testdata is null)
throw new Exception("unexpected internal state");
var proto = await factory(true);
+ if (Transport is null)
+ throw new Exception("unexpected internal state");
stop.Start();
await Testdata.WriteAsync(proto, Cancel.Token);
await Transport.FlushAsync(Cancel.Token);
@@ -146,6 +148,8 @@ namespace Client.Tests
var restored = new CrazyNesting();
proto = await factory(false);
+ if (Transport is null)
+ throw new Exception("unexpected internal state");
stop.Start();
await restored.ReadAsync(proto, Cancel.Token);
stop.Stop();