Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to configure parallel steps with a MySQL database

Hi,

I'm developping a CakePHP application. The application has about 1500 tests which take about 4 hours to run sequentially. Therefore I want to use parallel pipelines to run 10 tests at the same time.

CakePHP tests create, delete and empty tables on most of the tests, so when alle 10 pipelines this can be a problem, when 1 test is using a table and the other one deletes it. 

I've configured the 10 pipelines and written a custom PHP script that generates a PHPUnit test-suite for each of these 10 pipelines. Each test suite sets a DB_NAME environment variable so each pipeline can run on another database. I've added custom PHP code to create the database when it does not exists.

Locally, everything works perfect. However, when running the tests in Bitbucket pipelines I get the error: "Access denied for user 'testuser'@'%' to database 'test6'". So the default user can't create new databases next to the default "pipelines" database. And the documentation mentions no other users and also mentions that the root user is not available. 

 

How can I fix this so I can run parallel tests? Waiting 4 hours to finish testing is not an option.

1 answer

0 votes

Hi kvgysegh,

Are you running the MySQL database as a service inside Pipelines? Can you post your bitbucket-pipelines.yml configuration file (with any sensitive information redacted)? Note that if you're using Pipelines services, each step will get a separate whole service, ie. a separate whole MySQL instance, so there is no need to use different database names within MySQL.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,217 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you