jbonofre commented on code in PR #613:
URL: https://github.com/apache/polaris/pull/613#discussion_r1904431994
##########
extension/persistence/eclipselink/src/test/java/org/apache/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreManagerTest.java:
##########
@@ -204,11 +208,39 @@ void testRotateLegacyPrincipalSecret() {
private static class CreateStoreSessionArgs implements ArgumentsProvider {
@Override
- public Stream<? extends Arguments> provideArguments(ExtensionContext
extensionContext) {
+ public Stream<? extends Arguments> provideArguments(ExtensionContext
extensionContext)
+ throws URISyntaxException {
+ Path persistenceXml =
+ Paths.get(
+
Objects.requireNonNull(getClass().getResource("/META-INF/persistence.xml")).toURI());
+ Path confJar =
+ Paths.get(
+ Objects.requireNonNull(
+ getClass()
+ .getResource(
+
"/org/apache/polaris/extension/persistence/impl/eclipselink/test-conf.jar"))
+ .toURI());
return Stream.of(
+ // conf file not provided
+ Arguments.of(null, true),
+ // classpath resource
Arguments.of("META-INF/persistence.xml", true),
- Arguments.of("./build/conf/conf.jar!/persistence.xml", true),
- Arguments.of("/dummy_path/conf.jar!/persistence.xml", false));
+ Arguments.of("META-INF/dummy.xml", false),
+ // classpath resource, embedded
+ Arguments.of(
+
"org/apache/polaris/extension/persistence/impl/eclipselink/test-conf.jar!/persistence.xml",
+ true),
+ Arguments.of(
+
"org/apache/polaris/extension/persistence/impl/eclipselink/test-conf.jar!/dummy.xml",
+ false),
+ Arguments.of("dummy/test-conf.jar!/persistence.xml", false),
+ // filesystem path
+ Arguments.of(persistenceXml.toString(), true),
+ Arguments.of("/dummy_path/conf/persistence.xml", false),
+ // filesystem path, embedded
+ Arguments.of(confJar + "!/persistence.xml", true),
+ Arguments.of(confJar + "!/dummy.xml", false),
Review Comment:
Yes, it's my understanding reading the code: it's "backward" compatible,
fallbacking to the "inner" persistence xml.
--
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]