[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



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@xxxxxxxxxxx>
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.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits