summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2022-02-03 01:00:31 +0100
committerJens Geyer <jensg@apache.org>2022-02-05 03:04:41 +0100
commit2d667f34767b32d242687b5e31f65284f82ce16d (patch)
tree696a25ea24ecf45b690381fc8844061af3baf2a2 /test
parent6b5b6c479b047ea9953d74e14e9430b235f4c735 (diff)
downloadthrift-2d667f34767b32d242687b5e31f65284f82ce16d.tar.gz
FIX: test left too early on false premise
Diffstat (limited to 'test')
-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();