cloudfoundry / apt-buildpack

MIT License
31 stars 48 forks source link

integration tests fail for me #5

Closed drnic closed 6 years ago

drnic commented 6 years ago

I've run the integration tests three times and each time this test fails. I'm deploying to a latest CF on bosh-lite. Ideas for debugging/fixing?

$ cf t
api endpoint:   https://api.10-58-111-49.sslip.io
api version:    2.98.0
user:           admin
org:            system
space:          dev
$ cf -v
cf version 6.32.0+0191c33d9.2017-09-26
$ ./scripts/integration.sh
Running Suite: Integration Suite
================================
Random Seed: 1508883458
Will run 3 specs

Running in parallel across 3 nodes

Creating app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...
OK

Creating route simple-nbqcxeuqjwfkqgrblvjm.10-58-111-49.sslip.io...
OK

Binding simple-nbqcxeuqjwfkqgrblvjm.10-58-111-49.sslip.io to simple-nbqcxeuqjwfkqgrblvjm...
OK

Uploading simple-nbqcxeuqjwfkqgrblvjm...
Uploading app files from: /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/fixtures/simple
Uploading 566B, 3 files
Done uploading
OK

Setting env variable 'BP_DEBUG' to '1' for app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...
OK
TIP: Use 'cf restage simple-nbqcxeuqjwfkqgrblvjm' to ensure your env variable changes take effect
Starting app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...

Staging app and tracing logs...
Error staging application: App staging failed in the buildpack compile phase
FAILED
Deleting app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...
OK

• Failure [78.216 seconds]
Apt supply buildpack
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:13
  as a single buildpack
  /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:47
    reports failure [It]
    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:54

    Timed out after 3.001s.
    Expected
        <string>: Retrieving logs for app simple-nbqcxeuqjwfkqgrblvjm in org system / space dev as admin...

    to match regular expression
        <string>: (?i)failed

    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:56
------------------------------
• [SLOW TEST:96.848 seconds]
Apt supply buildpack
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:13
  as a final buildpack
  /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:32
    reports failure
    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:39
------------------------------
• [SLOW TEST:144.302 seconds]
Apt supply buildpack
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:13
  as a supply buildpack
  /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:17
    supplies apt packages to later buildpacks
    /Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:24
------------------------------

Summarizing 1 Failure:

[Fail] Apt supply buildpack as a single buildpack [It] reports failure
/Users/drnic/Projects/cloudfoundry/buildpacks/apt-buildpack/src/apt/integration/deploy_test.go:56

Ran 3 of 3 Specs in 350.202 seconds
FAIL! -- 2 Passed | 1 Failed | 0 Pending | 0 Skipped

Ginkgo ran 1 suite in 5m54.157217275s
Test Suite Failed
sclevine commented 6 years ago

Tests for develop and master are passing on the latest CF deployment in CI: https://buildpacks.ci.cf-app.com/teams/main/pipelines/apt-buildpack/jobs/specs-edge-integration-develop/builds/16 https://buildpacks.ci.cf-app.com/teams/main/pipelines/apt-buildpack/jobs/specs-edge-master/builds/2

Probably won't make a difference, but you could try running the tests from the cloudfoundry/cflinuxfs2 or cfbuildpacks/ci Docker image. I don't think we usually run these tests on Mac directly.

You could also try increasing that 3 second timeout, especially if your bosh-lite deployment isn't especially performant.

@idoru any other thoughts?

drnic commented 6 years ago

@sclevine I can now see the Timed out after 3.001s. issue in the output above. I'm trawling through cf CLI help but cannot spot which config option specifies this 3s timeout. Do you know? /cc @dkoper

drnic commented 6 years ago

Ok I found the magic number 3 in deploy_test.go.