forked from quic-go/quic-go
add support for the multiconnect interop test case
This commit is contained in:
@@ -62,6 +62,8 @@ func runTestcase(testcase string) error {
|
||||
defer r.Close()
|
||||
return downloadFiles(r, urls)
|
||||
case "handshake", "transfer", "retry":
|
||||
case "multiconnect":
|
||||
return runMultiConnectTest(urls)
|
||||
case "versionnegotiation":
|
||||
return runVersionNegotiationTest(urls)
|
||||
case "resumption":
|
||||
@@ -90,6 +92,19 @@ func runVersionNegotiationTest(urls []string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func runMultiConnectTest(urls []string) error {
|
||||
for _, url := range urls {
|
||||
r := &http09.RoundTripper{TLSClientConfig: tlsConf}
|
||||
if err := downloadFile(r, url); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := r.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func runResumptionTest(urls []string) error {
|
||||
if len(urls) < 2 {
|
||||
return errors.New("expected at least 2 URLs")
|
||||
|
||||
Reference in New Issue
Block a user