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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for PostgreSQL #45

Merged
merged 1 commit into from
Oct 4, 2022
Merged

Conversation

bendavies
Copy link
Contributor

@bendavies bendavies commented Oct 4, 2022

Adds support and fixes issues for PostgresSQL.

Should be merged before #43

@@ -102,7 +111,7 @@ protected function assertStoredMessageIsInDB(Envelope $envelope): void
/** @var MonitorIdStamp $monitorIdStamp */
$monitorIdStamp = $envelope->last(MonitorIdStamp::class);
$this->assertNotFalse(
$connection->executeQuery('SELECT id FROM messenger_monitor WHERE id = :id', ['id' => $monitorIdStamp->getId()])
$connection->executeQuery('SELECT id FROM messenger_monitor WHERE message_uid = :id', ['id' => $monitorIdStamp->getId()])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure this was a bug in the tests that maria DB hid, but postgres exposed it. as $monitorIdStamp->getId() is a uuid, which threw an error trying to coerse to an int

- "14"
dependencies:
- "lowest"
- "highest"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The matrix seems a bit excessive. We're already testing 8.0/8.1 and lowest/highest combination for mariadb. For postgres, I would choose just 8.1 and highest. For the postgres versions, are we doing anything fancy enough to reasonably think it would pass on one version but fail on another?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair comments, thanks.
I've revised it down to the latest postgres version now, which is the same as maria DB.
matrix size from 18 -> 4.

For postgres, I would choose just 8.1 and highest

Unsure about this - we still want to test that all combinations still work on postgres, regardless of if we've already test them on maria db, don't you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, we'd test every combination. But in practice, we should be pragmatic. Is it reasonable that Postgres specifically could cause a failure on 8.0 but not on 8.1? Perhaps (e.g. if you used an 8.1-specific syntax). For highest/lowest, that seems less likely. So I would be ok with removing highest/lowest but keeping 8.0 & 8.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okey dokey, done!

@weaverryan
Copy link
Contributor

Thanks Ben!

@weaverryan weaverryan merged commit 1746e5c into SymfonyCasts:master Oct 4, 2022
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.

2 participants