This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new 2d667f3  FIX: test left too early on false premise
2d667f3 is described below

commit 2d667f34767b32d242687b5e31f65284f82ce16d
Author: Jens Geyer <[email protected]>
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();

Reply via email to