ptrdom commented on issue #555:
URL: 
https://github.com/apache/pekko-persistence-r2dbc/issues/555#issuecomment-6722107323

   > 1. r2dbc-postgresql needed on the classpath: confirmed, this is a bug.
   
   That is a serious problem and it would be great to have a very thorough test 
for it. I see the PR has a test that plays around with the classloader and 
constructs a `ConnectionFactoryProvider` out of it, but every class in the 
project is at risk for this issue. I see two somewhat reliable ways forward:
   
   1. Split every test module to be per database.
   
      Then in `core` every database dependency would be `provided`, the new 
per-database modules, like `core-test-mysql` and others, would provide in 
`test` scope. I think the build definition changes will not be enough for this, 
will need to do some code restructuring.
   
   2. Have example projects for each database. 
   
       We then try to implement tests that try to hit every code path. Less 
reliable than #1, but there is additional utility in having example projects 
present and tested in the repo too. This is something I do for my projects, 
like https://github.com/ptrdom/scalajs-esbuild.
   
   I cannot see an easy way to cover this issue thoroughly, but I think it is 
worth the effort. If we decide to do nothing significant then let's at least 
note this down as an item for contributors, reviewers and agents. I likely 
would have pushed back more on staying aligned with Akka's module structure if 
I had foreseen the seriousness of this issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to