Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix heisenbug in IDE create test #333

Merged
merged 2 commits into from Oct 23, 2020

Conversation

danepowell
Copy link
Contributor

@danepowell danepowell commented Oct 22, 2020

Motivation

Kept getting this error running tests locally:

  1. Acquia\Cli\Tests\Commands\Ide\IdeCreateCommandTest::testCreate
    array_map(): Expected parameter 2 to be an array, null given

Seemed to be a bit of a heisenbug, it would come and go on different machines. I've never seen it in Travis CI, not sure why. Maybe there's an actual network call happening here? 馃槵

Proposed changes

Mock environment requests for all applications in this test. This is necessary because the command loops through all applications, but we only mock the first one:

Alternatives considered

I have no idea why this only happens in this one test, or why it happens intermittently. Quite possibly I'm missing something.

Testing steps

Run composer test on a machine where you've previously seen this bug.

@danepowell
Copy link
Contributor Author

Oh great, now it passes every time locally but not on Travis 馃檮

Ya know... given that the environment request happens in the function that matches the local Git repo to a Cloud app, I bet this is happening because the PHPUnit tests are run in the acli repo locally. ACLI is trying to match itself to a Cloud app when running locally.

@danepowell
Copy link
Contributor Author

Yeah I was way off initially, we just needed to respond "no" to the question to link repos.

@danepowell danepowell merged commit 3965d77 into acquia:master Oct 23, 2020
@danepowell danepowell deleted the ide-create-test branch September 22, 2021 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant