You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/01/21 09:24:37 UTC
[GitHub] [ignite] SomeFire commented on a change in pull request #7216:
IGNITE-12493: Replace direct setClientMode call with startClientGrid.
SomeFire commented on a change in pull request #7216: IGNITE-12493: Replace direct setClientMode call with startClientGrid.
URL: https://github.com/apache/ignite/pull/7216#discussion_r368888486
##########
File path: modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheP2pUnmarshallingNearErrorTest.java
##########
@@ -32,8 +33,8 @@
}
/** {@inheritDoc} */
- @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
- IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);
+ @Override protected IgniteConfiguration optimize(IgniteConfiguration cfg) throws IgniteCheckedException {
Review comment:
We can do something like
```
class GridAbstractTest {
ThreadLocal<Boolean> isClient = ... // false by default
...
protected IgniteEx startClientGrid(String igniteInstanceName) throws Exception {
isClient.set(true);
IgniteConfiguration cfg = getConfiguration(igniteInstanceName);
cfg = optimize(cfg);
return (IgniteEx)startGrid(igniteInstanceName, cfg, null);
}
...
protected getConfiguration(igniteInstanceName) {
...
cfg.setClientMode(isClient.get());
...
}
...
}
```
So, client mode will be set in superest call of `getConfiguration()` method and could be used anywhere.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services