Hi Kevin,
You can use com.gemstone.gemfire.cache.DynamicRegionFactory from the client
to exercise CreateRegion and DestroyRegion.

On Wed, Jun 22, 2016 at 8:43 AM, Kevin Duling <kdul...@pivotal.io> wrote:

> I'm trying to figure out how to exercise the CreateRegion and
> DestoryRegion classes from a client in order to test authorization.  I
> can't figure out what the API would be for a client to trigger the
> cmdExecute() call on the server.
>
> For example, I was able to hit it in ClearRegion by having the client
> execute the Region.clear() method.  Here's a snippet from the unit
> test:
>
> SerializableRunnable clearAuthorized = new SerializableRunnable() {
>   @Override
>   public void run() {
>     Cache cache =
> SecurityTestUtils.createCacheClient("authRegionUser", "1234567",
> serverPort, SecurityTestUtils.NO_EXCEPTION);
>     final Region region = cache.getRegion(SecurityTestUtils.REGION_NAME);
>     region.clear();
>     cache.close();
>   }
> };
> client2.invoke(clearAuthorized);
>

Reply via email to