Skip to content

Error: "test database already exists" - only during Travis builds of the "push" #46

Description

@MikeTheCanuck

When I push a PR to our Budget backend repo, Travis fires off two builds:

  • continuous-integration/travis-ci/push (e.g. this build)
  • continuous-integration/travis-ci/pr (e.g. this build)

The "push" build always fails, and the "pr" build always passes.

When the "push" build fails, this is the tail end of the Travis build log:

Creating test database for alias 'default'...
Got an error creating the test database: database "test_budget" already exists
Destroying old test database for alias 'default'...
Got an error recreating the test database: database "test_budget" is being accessed by other users
DETAIL:  There is 1 other session using the database.
The command "./budget_proj/bin/test-proj.sh -t" exited with 2.
Done. Your build exited with 1.

I have already made sure that I'm running the manage.py test --no-input command - so that python is supposed to ignore any warnings like this.

I want to stop this error from coming up, because it isn't a good habit to get into, me ignoring a broken build and merging the PR despite that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions