UniterSuite.TestRunCommand intermittent failure

Bug #1822739 reported by John A Meinel
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Expired
Medium
Unassigned

Bug Description

http://ci.jujucharms.com/job/make-check-juju/4093/testReport/junit/github/com_juju_juju_worker_uniter/TestPackage/

github.com/juju/juju/worker/uniter.TestPackage

----------------------------------------------------------------------
FAIL: util_unix_test.go:105: UniterSuite.TestRunCommand
...
util_unix_test.go:118:
    // TODO(babbageclunk): Without the config changes and (waiting for
    // the hook) this test sometimes panics. It seems like a race in
    // the quickStart steps but haven't worked it out properly yet.
    s.runUniterTests(c, []uniterTest{
        ut(
            "run commands: model",
            quickStart{},
            runCommands{echoUnitNameToFile("run.output")},
            verifyFile{filepath.Join(testDir, "run.output"), "juju run u/0\n"},
        ), ut(
            "run commands: jujuc commands",
            quickStartRelation{},
            changeConfig{"blog-title": "this is a hack"},
            waitHooks{"config-changed"},
            runCommands{
                fmt.Sprintf("unit-get private-address >> %s", testFile("jujuc.output")),
                fmt.Sprintf("unit-get public-address >> %s", testFile("jujuc.output")),
            },
            verifyFile{
                testFile("jujuc.output"),
                "private.address.example.com\npublic.address.example.com\n",
            },
        ), ut(
            "run commands: jujuc model",
            quickStartRelation{},
            changeConfig{"blog-title": "this is a hack"},
            waitHooks{"config-changed"},
            relationRunCommands{
                fmt.Sprintf("echo $JUJU_RELATION_ID > %s", testFile("jujuc-env.output")),
                fmt.Sprintf("echo $JUJU_REMOTE_UNIT >> %s", testFile("jujuc-env.output")),
            },
            verifyFile{
                testFile("jujuc-env.output"),
                "db:0\nmysql/0\n",
            },
        ), ut(
            "run commands: proxy settings set",
            quickStartRelation{},
            changeConfig{"blog-title": "this is a hack"},
            waitHooks{"config-changed"},
            setProxySettings{Http: "http", Https: "https", Ftp: "ftp", NoProxy: "localhost"},
            runCommands{
                fmt.Sprintf("echo $http_proxy > %s", testFile("proxy.output")),
                fmt.Sprintf("echo $HTTP_PROXY >> %s", testFile("proxy.output")),
                fmt.Sprintf("echo $https_proxy >> %s", testFile("proxy.output")),
                fmt.Sprintf("echo $HTTPS_PROXY >> %s", testFile("proxy.output")),
                fmt.Sprintf("echo $ftp_proxy >> %s", testFile("proxy.output")),
                fmt.Sprintf("echo $FTP_PROXY >> %s", testFile("proxy.output")),
                fmt.Sprintf("echo $no_proxy >> %s", testFile("proxy.output")),
                fmt.Sprintf("echo $NO_PROXY >> %s", testFile("proxy.output")),
            },
            verifyFile{
                testFile("proxy.output"),
                "http\nhttp\nhttps\nhttps\nftp\nftp\nlocalhost\nlocalhost\n",
            },
        ), ut(
            "run commands: async using rpc client",
            quickStart{},
            asyncRunCommands{echoUnitNameToFile("run.output")},
            verifyFile{testFile("run.output"), "juju run u/0\n"},
            waitContextWaitGroup{},
        ), ut(
            "run commands: waits for lock",
            quickStart{},
            lock.acquire(),
            asyncRunCommands{echoUnitNameToFile("wait.output")},
            verifyNoFile{testFile("wait.output")},
            lock.release(),
            verifyFile{testFile("wait.output"), "juju run u/0\n"},
            waitContextWaitGroup{},
        ),
    })
util_test.go:845:
    c.Fatalf("never got expected hooks")
... Error: never got expected hooks

John A Meinel (jameinel)
Changed in juju:
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for juju because there has been no activity for 60 days.]

Changed in juju:
status: Incomplete → Expired
Revision history for this message
Christian Muirhead (2-xtian) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.