[tor-commits] [pluggable-transports/snowflake] 02/13: Add repeated test for utls roundtripper

gitolite role git at cupani.torproject.org
Wed Mar 16 09:14:10 UTC 2022


This is an automated email from the git hooks/post-receive script.

shelikhoo pushed a commit to branch main
in repository pluggable-transports/snowflake.

commit 44478606615c3ff848d9d9749a17fd89430aa6d9
Author: Shelikhoo <xiaokangwang at outlook.com>
AuthorDate: Wed Feb 9 15:38:27 2022 +0000

    Add repeated test for utls roundtripper
---
 common/utls/roundtripper_test.go | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/common/utls/roundtripper_test.go b/common/utls/roundtripper_test.go
index b0209ff..90c09bd 100644
--- a/common/utls/roundtripper_test.go
+++ b/common/utls/roundtripper_test.go
@@ -129,23 +129,25 @@ func TestRoundTripper(t *testing.T) {
 				InsecureSkipVerify: true,
 			}, http.DefaultTransport)
 
-			Convey("HTTP 1.1 Test", t, func(c C) {
-				{
-					req, err := http.NewRequest("GET", "https://127.0.0.1:23801/", nil)
-					So(err, ShouldBeNil)
-					_, err = rtter.RoundTrip(req)
-					So(err, ShouldBeNil)
-				}
-			})
+			for count := 0; count <= 10; count++ {
+				Convey("HTTP 1.1 Test", t, func(c C) {
+					{
+						req, err := http.NewRequest("GET", "https://127.0.0.1:23801/", nil)
+						So(err, ShouldBeNil)
+						_, err = rtter.RoundTrip(req)
+						So(err, ShouldBeNil)
+					}
+				})
 
-			Convey("HTTP 2 Test", t, func(c C) {
-				{
-					req, err := http.NewRequest("GET", "https://127.0.0.1:23802/", nil)
-					So(err, ShouldBeNil)
-					_, err = rtter.RoundTrip(req)
-					So(err, ShouldBeNil)
-				}
-			})
+				Convey("HTTP 2 Test", t, func(c C) {
+					{
+						req, err := http.NewRequest("GET", "https://127.0.0.1:23802/", nil)
+						So(err, ShouldBeNil)
+						_, err = rtter.RoundTrip(req)
+						So(err, ShouldBeNil)
+					}
+				})
+			}
 		})
 	}
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tor-commits mailing list