Skip to content

Commit

Permalink
GEODE-10126: Use system properties to configure redis
Browse files Browse the repository at this point in the history
Use system properties to configure the redis server, instead of the gemfire
properties, which have now been removed.
  • Loading branch information
upthewaterspout committed Apr 6, 2022
1 parent c818de1 commit 0892daf
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import static java.lang.String.valueOf;

import org.apache.geode.benchmark.tasks.StartServer;
import org.apache.geode.cache.CacheFactory;
import org.apache.geode.cache.server.CacheServer;
import org.apache.geode.perftest.TestContext;

Expand All @@ -35,13 +34,15 @@ public StartGeodeServer(final int locatorPort, final int serverPort, final int r
}

@Override
protected CacheFactory configureCacheFactory(final CacheFactory cacheFactory,
final TestContext context)
throws Exception {

return super.configureCacheFactory(cacheFactory, context)
.set("geode-for-redis-enabled", valueOf(true))
.set("geode-for-redis-port", valueOf(redisPort));
public void run(TestContext context) throws Exception {
try {
System.setProperty("gemfire.geode-for-redis-port", valueOf(redisPort));
System.setProperty("gemfire.geode-for-redis-enabled", valueOf(true));
super.run(context);
} finally {
System.clearProperty("gemfire.geode-for-redis-port");
System.clearProperty("gemfire.geode-for-redis-enabled");
}
}

@Override
Expand Down

0 comments on commit 0892daf

Please sign in to comment.