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

test: remove ->expects(self::any()) #13

Closed
wants to merge 11 commits into from
Closed

test: remove ->expects(self::any()) #13

wants to merge 11 commits into from

Conversation

simPod
Copy link
Owner

@simPod simPod commented Nov 2, 2024

…6563)

Q A
Type improvement
Fixed issues

Summary

Covers the concern expressed by @greg0ire
doctrine#6545 (comment)

This ensures the transaction is (not)active based on autocommmit mode
when interacting with transactional().

Q A
Type bug/feature/improvement
Fixed issues

Summary

… transaction

Let's get rid of There's no active transaction exception which occurs e.g. when using deferred constraints so the violation is checked at the end of the transaction and not during it.

  • Do not rollback only on exceptions where we know the transaction is no longer active
  • Introduce TransactionRolledBack exception
  • Transform Oracle's "transaction rolled back" exception and use the underlying one that DBAL supportstest: remove ->expects(self::any())

simPod and others added 11 commits October 19, 2024 23:21
test: remove ->expects(self::any())
|      Q       |   A
|------------- | -----------
| Type         | improvement
| Fixed issues | <!-- use #NUM format to reference an issue -->

#### Summary

_This is a followup of https://github.com/doctrine/dbal/pull/6558_, I
have touched only what previous PR touched.

@greg0ire
[requested](doctrine#6562 (review))
to use stubs where there are no expectations


![image](https://github.com/user-attachments/assets/f71ad45f-87f7-4575-b10d-2f46b2c6525a)
Cover scenario `BEGIN TRANSACTION; COMMIT; BEGIN TRANSACTION; --failure`
<!-- Fill in the relevant information below to help triage your pull
request. -->

|      Q       |   A
|------------- | -----------
| Type         | improvement
| Fixed issues | <!-- use #NUM format to reference an issue -->

#### Summary

Run CI tests against Postgres 17.
…octrine#6563)

|      Q       |   A
|------------- | -----------
| Type         | improvement
| Fixed issues | <!-- use #NUM format to reference an issue -->

#### Summary

Covers the concern expressed by @greg0ire
doctrine#6545 (comment)

This ensures the transaction is (not)active based on `autocommmit` mode
when interacting with `transactional()`.
… transaction

Let's get rid of There's no active transaction exception which occurs e.g. when using deferred constraints so the violation is checked at the end of the transaction and not during it.

- Do not rollback only on exceptions where we know the transaction is no longer active
- Introduce TransactionRolledBack exception
- Transform Oracle's "transaction rolled back" exception and use the underlying one that DBAL supports
Copy link

codecov bot commented Nov 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.95%. Comparing base (dcf8c2d) to head (2d94fd2).
Report is 9 commits behind head on 3.9.x.

Additional details and impacted files
@@            Coverage Diff             @@
##            3.9.x      #13      +/-   ##
==========================================
+ Coverage   85.90%   85.95%   +0.04%     
==========================================
  Files         277      277              
  Lines       17049    17077      +28     
==========================================
+ Hits        14646    14678      +32     
+ Misses       2403     2399       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@simPod simPod closed this Nov 2, 2024
@simPod simPod deleted the test2 branch November 2, 2024 18:40
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.

5 participants