dangogh closed pull request #3070: v3.1.1 - now processes each route 
immediately as it is read
URL: https://github.com/apache/trafficcontrol/pull/3070
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/traffic_ops/testing/compare/compare.go 
b/traffic_ops/testing/compare/compare.go
index 220d7739d..0f8f07d72 100644
--- a/traffic_ops/testing/compare/compare.go
+++ b/traffic_ops/testing/compare/compare.go
@@ -36,7 +36,7 @@ import (
        "golang.org/x/net/publicsuffix"
 )
 
-const __version__ = "3.1.0"
+const __version__ = "3.1.1"
 const SHORT_HEADER = "# DO NOT EDIT"
 const LONG_HEADER = "# TRAFFIC OPS NOTE:"
 const LUA_HEADER = "-- DO NOT EDIT"
@@ -579,23 +579,18 @@ func main() {
        }
        wg.Wait()
 
-       var testRoutes []string
-
        scanner := bufio.NewScanner(routesFile)
        for scanner.Scan() {
-               testRoutes = append(testRoutes, scanner.Text())
+               wg.Add(1)
+               go func(r string) {
+                       testRoute(tos, r)
+                       wg.Done()
+               }(scanner.Text())
        }
 
        if err := scanner.Err(); err != nil {
                log.Fatal(err)
        }
 
-       wg.Add(len(testRoutes))
-       for _, route := range testRoutes {
-               go func(r string) {
-                       testRoute(tos, r)
-                       wg.Done()
-               }(route)
-       }
        wg.Wait()
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to