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

Fix some more failing integration tests #707

Merged
merged 6 commits into from
Oct 23, 2023
Merged

Fix some more failing integration tests #707

merged 6 commits into from
Oct 23, 2023

Conversation

Curlack
Copy link
Contributor

@Curlack Curlack commented Oct 22, 2023

Would've like to separate the core changes into a different PR, but got ahead of myself.

PetaPoco/Database.cs Outdated Show resolved Hide resolved
@Ste1io
Copy link
Collaborator

Ste1io commented Oct 23, 2023

For future reference (referring to commit d97066b) when syncing private feature branches like this one, prefer a rebase with force-push over a merge to cut down on the extra commits in the history. Contributor docs don't specifically say anything about it yet (that's on me), so figured I'd mention it. In the web UI, it would need selected from the "Update branch" button dropdown.

Copy link
Collaborator

@Ste1io Ste1io left a comment

Choose a reason for hiding this comment

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

Everything looks honky-dory. Major step toward the finish line with Oracle' support thanks to @Curlack. I've pulled the changes locally to run the entire test suite with all dbms's, and will merge this into the base feature branch provided no regressions from the core changes.

[EDIT] This drops failing Oracle tests down from 70/301 to 15/301. Nicely done @Curlack! Also, MariaDB, Postgres and SqlServer tests all pass with the changes; don't foresee any issues from the remaining ones either, but will let the runner finish before closing this.

@Curlack
Copy link
Contributor Author

Curlack commented Oct 23, 2023

For future reference (referring to commit d97066b) when syncing private feature branches like this one, prefer a rebase with force-push over a merge to cut down on the extra commits in the history. Contributor docs don't specifically say anything about it yet (that's on me), so figured I'd mention it. In the web UI, it would need selected from the "Update branch" button dropdown.

Ok now this is a teaching moment for me. I saw the "Update Branch" button, but wasn't sure if I should press it. Famous last words: "Hmm, what does this button do?" Hahaha.

I'm also beginning to realize that "rebase" has a different meaning than what I thought it means. I come from TFS, Azure Devs Ops and SourceSafe world. Not too many difference between them, but huge difference compared to Github. Also used SubVersion for a little while some years ago. Iirc that's closer to Github than those others. Anyway, I thought "rebase" means to move feature branch to different main branch.

I can still see the button, should I go push it? 😆

@asherber
Copy link
Collaborator

@Curlack Don't push "Update branch" -- click the down arrow next to it and choose "Update with rebase".

@Curlack
Copy link
Contributor Author

Curlack commented Oct 23, 2023

@Curlack Don't push "Update branch" -- click the down arrow next to it and choose "Update with rebase".

Ah, I see! So once it reads "Rebase branch" I should push it?

Curlack and others added 6 commits October 24, 2023 00:09
Add unit test to confirm.
1. Try to drop the user first so we can use the "user still connected" failure to bypass setup i.e. assume already setup correctly. This is to allow the developer to stay connected to the database (via SQLPlus or SQL Developer).

Modify OracleTestProvider
1. If Oracle setup fails, propagate failure to all tests without retrying for every test in the batch. This makes all tests fail with the same exception. In the case the user is still connected, setup is bypassed.

Fix Oracle build scripts
1. Stored procedures don't use any characters to denote a parameter, so they have to be fully qualified e.g. ProcName.paramName to differentiate them from column names (if the same name is used e.g. age).

Fix breaking tests:
1. QueryTests.cs had couple of malformed sql statements after string concatenation (missing space).
2. Override all (Oracle)StoredProcTests.cs methods that require an additional RefCursor output parameter.
3. Override all (Oracle)QueryTests.cs paging methods that require '*' to be aliased.
4. OracleQueryTests.cs had a couple of statements ending in a semi-colon, which it didn't appreciate.
5. Fix top 1 query in "QueryMultiple ForSingleResultsSetWithMultiPoco ShouldReturnValidPocoCollection". Also provide version 12c and above syntax.
6. Skip MultiResultSetWithMultiPoco tests since Oracle also does not support it (as with MSAccess and Firebird).
…ds. Oracle doesn't utilize the parameter prefix in this case.

Fixes #691
Give OracleDatabaseProvider its own implementation of BuildPageQuery and use "Select null from dual" instead of "Select null" when ORDER BY clause is absent. Alo include version 12c and above syntax in a comment for future reference.
…of "undoing" the pramPrefix modification in OracleDatabaseProvider.
Co-authored-by: Stelio Kontos <[email protected]>
@Curlack
Copy link
Contributor Author

Curlack commented Oct 23, 2023

Whooohooo! I did it and everything is still green.
I can also see that the commit mentioning my fork is now gone, or at least merged into one of the other commits??
Thanks guys.

@Ste1io
Copy link
Collaborator

Ste1io commented Oct 23, 2023

@Curlack Don't push "Update branch" -- click the down arrow next to it and choose "Update with rebase".

Ah, I see! So once it reads "Rebase branch" I should push it?

Correct. Then when you're at your home PC, you can just pull your private feature branch from remote to sync up, and you'll see the additional commits made here locally also, sans the additional "changes merged" commit that is created by a merge. In this case, you'll still see one of those merge commits from the previous one I mentioned, but if you follow this in the future it will keep the git history much cleaner.

With git, rebasing combines the commits into a single line with the commits appearing together, as supposed to two adding a merge commit that joins two separate lines (if you were looking at a git graph). Since it does perform a rewrite of history in some cases, it requires a force push afterwards. On private branches, such as this one, that's fine. On shared branches, such as the base feature branch this PR is targeting, a merge is safer and clearly shows how the private branches converge with their associated contributions.

Edit: Actually, that merge commit seems to be gone now. I guess GitHub essentially reset to the first commit, and reapplied them all using rebase instead of merge? Cool...lol. They didn't have that fancy bit around when @asherber schooled me on this LMAO.

@Ste1io
Copy link
Collaborator

Ste1io commented Oct 23, 2023

Whooohooo! I did it and everything is still green. I can also see that the commit mentioning my fork is now gone, or at least merged into one of the other commits?? Thanks guys.

The fork that is gone would be referring to pr/Curlack/707, which was created automatically when committing my suggested changes through the GitHub web interface. By rebasing your branch onto that one, it's no longer needed, as the commits from it were applied to your private branch (and GitHub most likely auto-deleted it behind the scene).

Notice the gray "merge branch..." commit, which was created when merging as supposed to rebasing, and how there's a diversion from the branch that gets merged in:

1698100079-PetaPoco_-_Git_Graph

Using rebase, all the commits are still there, but in a single straight line on your branch:

1698100179-PetaPoco_-_Git_Graph

The lower half of the above image is from your previous commits in the last PR. The upper half is from this one using rebase instead of merge.

@Curlack
Copy link
Contributor Author

Curlack commented Oct 23, 2023

Thanks @Ste1io . Very well explained. I get what rebase, in Github terms, means now.

@Ste1io
Copy link
Collaborator

Ste1io commented Oct 23, 2023

net472

Tests in group: 3472
Total Duration: 120.1 min

Outcomes
3414 Passed
15 Failed
43 Skipped

netcoreapp3.1

Tests in group: 3186
Total Duration: 90.3 min

Outcomes
3166 Passed
15 Failed
5 Skipped

All 15 failures are expected, and originating from Oracle.

@Ste1io Ste1io merged commit 719731a into CollaboratingPlatypus:feature/oracle-support Oct 23, 2023
@Ste1io
Copy link
Collaborator

Ste1io commented Oct 23, 2023

Nearly forgot...

Merging Oracle 01

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.

PetaPoco. Providers: When using Oracle, calling FetchAsync will throw exception
3 participants