Skip to content

Random integration test failures #1158

Closed

Description

@mfojtik

Today I noticed this again:

--- FAIL: TestSimpleImageChangeBuildTrigger (0.20 seconds)
    deploy_trigger_test.go:317: Starting test openshift
    imagechange_buildtrigger_test.go:69: Expected build with base image registry:8080/openshift/test-image:ref-2, got registry:8080/openshift/test-image:ref-1

(full log: https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1040/console)

This issue appears to be random, if I change something in my PR and push again, the Jenkins will merge without problems. Since this happened pretty often I think someone should take a look and investigate...

@bparees @smarterclayton @soltysh FYI

Activity

  1. soltysh commented on Feb 26, 2015

    @soltysh
    Contributor

    My fears were around the same image being used in two separate test files (comment), although each test is run in separate process and tests are run sequentially (comment) we are using under the cover only one etcd deamon. In that case using exactly the same image name in the same namespace results in unexpected behavior. Apparently @mfojtik was lucky enough to hit a situation when those two tests were modifying that image so that tests were failing. I'm hoping the referenced PR will fix this.

  2. smarterclayton commented on Feb 26, 2015

    @smarterclayton
    Contributor

    We should be deleting everything in etcd before each test. If not, that's something to be fixed in the test case

    On Feb 26, 2015, at 2:24 AM, Maciej Szulik [email protected] wrote:

    My fears were around the same image being used in two separate test files (comment, although each test is run in separate process and tests are run sequentially (comment) we are using under the cover only one etcd deamon. In that case using exactly the same image name in the same namespace results in unexpected behavior. Apparently @mfojtik was lucky enough to hit a situation when those two tests were modifying that image so that tests were failing. I'm hoping the referenced PR will fix this.

    —
    Reply to this email directly or view it on GitHub.

  3. soltysh commented on Feb 27, 2015

    @soltysh
    Contributor

    Just double checked, we are calling deleteAllEtcdKeys in all the tests wherever we require etcd, especially the ones mentioned in this issue. I guess we'll wait for the other occurrence of the problem.

  4. soltysh commented on Mar 2, 2015

    @soltysh
    Contributor
  5. bparees commented on Mar 6, 2015

    @bparees
    Contributor

    I have a theory on what is happening here... @ironcladlou you're most familiar w/ the watch logic so maybe you can confirm.

    1. we create the image repo with the "ref-1" tag
    2. we create the buildconfig w/ the imagechangetrigger
    3. the image change controller gets the event for the imagerepo creation after the buildconfig was created
    4. the image change controller triggers a build using the "ref-1" tag from the imagerepo event it got.
    5. the test fails
    6. (unseen by the test): we update the imagerepo with the ref-2 tag
    7. another build is run using the ref-2 tag.

    to fix this we need to ensure the buildconfig doesn't get created until after the imagerepo event is delivered, or we need to ensure the buildconfig is created first and ignore the first build event.

    either way if i'm right, it's a test case problem and not a product problem, so that's good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions