Skip to content

Improve tests#41

Merged
PhenX merged 4 commits intoPhenX:masterfrom
SebastianStehle:fix-tests
May 25, 2025
Merged

Improve tests#41
PhenX merged 4 commits intoPhenX:masterfrom
SebastianStehle:fix-tests

Conversation

@SebastianStehle
Copy link
Copy Markdown
Collaborator

I have implemented the test improvements with strategy pattern. I actually found a bug in sqlite. Therefore the tests are not green yet.

@SebastianStehle SebastianStehle requested a review from PhenX as a code owner May 25, 2025 20:33
var actualConfigure = configure ?? (_ => { });
switch (strategy)
{
case InsertStrategy.InsertReturn:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

My thought was to have two enums or two bools, but it works well like this too, as long as there are no more than two parameters

@SebastianStehle
Copy link
Copy Markdown
Collaborator Author

I have found a case where the temporary tables in SQLite are not dropped properly. I am using a random identifier now and ensure that the tables are dropped. I think we should do this anyway, also for other providers. Because when you have a long custom transaction these temporary tables might exist longer than necessary.

@PhenX
Copy link
Copy Markdown
Owner

PhenX commented May 25, 2025

Good catch for the sqlite issue!

@SebastianStehle
Copy link
Copy Markdown
Collaborator Author

Yeah, when you find one bug with something like it is worth it :)

@SebastianStehle
Copy link
Copy Markdown
Collaborator Author

Tests are green again. I am done here.

@PhenX PhenX merged commit 0644b4b into PhenX:master May 25, 2025
2 checks passed
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