playground: Make user programs listen on localhost.
Resolves hack from v.io/c/21722
Change-Id: Ic0fcf8150786a221f9a55263d65f226285d7144b
diff --git a/go/src/v.io/x/playground/builder/builder_v23_test.go b/go/src/v.io/x/playground/builder/builder_v23_test.go
index 88bce9b..077f768 100644
--- a/go/src/v.io/x/playground/builder/builder_v23_test.go
+++ b/go/src/v.io/x/playground/builder/builder_v23_test.go
@@ -87,7 +87,7 @@
if len(authfile) > 0 {
files = append(files, authfile)
}
- inv := runPGExample(t, sh, builderPath, testdataDir, files, "--verbose=true", "--includeProfileEnv=true", "--runTimeout=5s")
+ inv := runPGExample(t, sh, builderPath, testdataDir, files, "--verbose=true", "--includeProfileEnv=true")
t.Logf("test: %s", c.name)
inv.S.ExpectSetEventuallyRE(patterns...)
inv.Wait()
@@ -133,7 +133,7 @@
t.Fatal(tu.FormatLogLine(0, "unknown glob %q", globName))
}
- inv := runPGExample(t, sh, builderPath, example.Path, glob.Patterns, "--verbose=true", "--runTimeout=5s")
+ inv := runPGExample(t, sh, builderPath, example.Path, glob.Patterns, "--verbose=true")
t.Logf("glob: %s", globName)
inv.S.ExpectSetEventuallyRE(example.Output...)
inv.Wait()
diff --git a/go/src/v.io/x/playground/builder/main.go b/go/src/v.io/x/playground/builder/main.go
index b7b1051..90a7168 100644
--- a/go/src/v.io/x/playground/builder/main.go
+++ b/go/src/v.io/x/playground/builder/main.go
@@ -317,7 +317,9 @@
func (f *codeFile) startGo() error {
var err error
- f.cmd, err = makeCmd(f.Name, false, f.credentials, filepath.Join("bin", f.binaryName))
+ f.cmd, err = makeCmd(f.Name, false, f.credentials,
+ filepath.Join("bin", f.binaryName),
+ "-v23.tcp.address=127.0.0.1:0")
if err != nil {
return err
}
diff --git a/go/src/v.io/x/playground/bundles/fortune/src/server/server.go b/go/src/v.io/x/playground/bundles/fortune/src/server/server.go
index 2ae9896..985ca6b 100644
--- a/go/src/v.io/x/playground/bundles/fortune/src/server/server.go
+++ b/go/src/v.io/x/playground/bundles/fortune/src/server/server.go
@@ -62,20 +62,6 @@
ctx, shutdown := v23.Init()
defer shutdown()
- // TODO(ivanpi): The playground executor should somehow force the
- // ListenSpec to be this way.
- // When a ListenSpec is not explicitly specified, the "roaming" runtime
- // factory sets it up to be the public IP address of the virtual
- // machine running on Google Compute Engine or Amazon Web Services.
- // Normally, the playground should execute code inside a docker image,
- // but in tests it is run on the host machine and having this test
- // service exported on a public IP (when running on GCE) is not an
- // intent. Furthermore, the test may fail if the firewall rules block
- // access to the selected port on the public IP.
- ctx = v23.WithListenSpec(ctx, rpc.ListenSpec{
- Addrs: rpc.ListenAddrs{{"tcp", "127.0.0.1:0"}},
- })
-
// Create the fortune server stub.
fortuneServer := fortune.FortuneServer(newFortuned())