You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2022/02/03 21:27:55 UTC
[thrift] branch 0.16.0 updated: FIX: test left too early on false premise
This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch 0.16.0
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/0.16.0 by this push:
new b9fe9c2 FIX: test left too early on false premise
b9fe9c2 is described below
commit b9fe9c2417f26fa6e1d9383b8fa9d50ff9a96d65
Author: Jens Geyer <je...@apache.org>
AuthorDate: Thu Feb 3 01:00:31 2022 +0100
FIX: test left too early on false premise
---
test/netstd/Client/Performance/PerformanceTests.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/netstd/Client/Performance/PerformanceTests.cs b/test/netstd/Client/Performance/PerformanceTests.cs
index c1f00dd..6ac3aed 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();