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

Allow setting provider in ServerOptions? #2

Open
vijayakumarsuraj opened this issue Mar 10, 2022 · 1 comment
Open

Allow setting provider in ServerOptions? #2

vijayakumarsuraj opened this issue Mar 10, 2022 · 1 comment

Comments

@vijayakumarsuraj
Copy link

I ran into this issue trying to write tests using the new "exploration queries" feature from 5.3. But, because the version of ravendb-server that is bundled here doesn't support that feature, my tests fail.

Instead of waiting for a newer version of this library, I think it would be nice if I could just point it at a different ravendb-server.zip file to get my tests running.

@ml054
Copy link
Member

ml054 commented Mar 10, 2022

Hi, @vijayakumarsuraj Thank you for reporting this issue

I confirm that currently you can't override server location and use external RavenDB instance. I opened an issue so you can track progress: https://issues.hibernatingrhinos.com/issue/RDBC-557

As temporary workaround you can create your own Provider similar to this one:

public class CopyServerProvider implements IProvideRavenDBServer {

Where you can copy from custom copy.

Provider field isn't public in ServerOptions so as workaround you can use reflection:

Field providerField = serverOptions.getClass().getDeclaredField("provider");
providerField.setAccessible(true);
providerField.set(serverOptions, new MyCustomRavenDBProvider());

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

No branches or pull requests

2 participants