[
https://issues.apache.org/jira/browse/LUCENE-10301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17463281#comment-17463281
]
Dawid Weiss commented on LUCENE-10301:
--------------------------------------
{quote}calls our setters from outside the only allowed methodsĀ
{quote}
I think it's impossible to call those setters more than once now and from any
other class then Lucene - TestSecrets has a static initializer which
initializes all classes from which secrets are delegated - these static
initializers call the setters in TestSecrets in turn. So by the time the class
is initialized, all the setters have been called. the JVM will ensure the
proper ordering here and there is a runtime check that ensures each setter is
invoked exactly once, so any subsequent call will fail.
I really do think this is sufficient in the short term. In the long term,
ensure TestSecrets is loaded in module mode - if it isn't fail. This shifts the
accessibility checks to the JVM again.
> The test-framework as a module (or a separate test-framework-module)
> --------------------------------------------------------------------
>
> Key: LUCENE-10301
> URL: https://issues.apache.org/jira/browse/LUCENE-10301
> Project: Lucene - Core
> Issue Type: Sub-task
> Reporter: Dawid Weiss
> Priority: Major
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> The test framework has split packages. It's a follow-up to introducing
> modules but eventually the modular test subprojects will need something like
> the test framework too.
> I'm not sure whether we should start a new subproject for this or try to
> refactor the test framework, but it's a follow-up once the modules themselves
> are working and testable, I think.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]