Github user kirklund commented on a diff in the pull request:

    https://github.com/apache/incubator-geode/pull/278#discussion_r86041266
  
    --- Diff: 
geode-core/src/test/java/org/apache/geode/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
 ---
    @@ -1091,6 +1086,126 @@ public void testDestroyRegionWithSharedConfig() {
         });
       }
     
    +
    +  final String PR_STRING = " package com.cadrdunit;"
    +      + " public class TestPartitionResolver implements 
org.apache.geode.cache.PartitionResolver { "
    +      + "   @Override" + "   public void close() {" + "   }" + "   
@Override"
    +      + "   public Object 
getRoutingObject(org.apache.geode.cache.EntryOperation opDetails) { "
    +      + "    return null; " + "   }" + "   @Override" + "   public String 
getName() { "
    +      + "    return \"TestPartitionResolver\";" + "   }" + " }";
    +
    +  /**
    +   * Test Description 1. Deploy a JAR with Custom Partition Resolver 2. 
Create Region with Partition
    +   * Resolver 3. Region should get created with no Errors 4. Verify Region 
Partition Attributes for
    +   * Partition Resolver
    +   * 
    +   * @throws IOException
    +   */
    +  @Test
    +  public void testCreateRegionWithPartitionResolver() throws IOException {
    +    setUpJmxManagerOnVm0ThenConnect(null);
    +    VM vm = Host.getHost(0).getVM(1);
    +    // Create a cache in vm 1
    +    vm.invoke(() -> {
    +      assertNotNull(getCache());
    +    });
    +
    +    ClassBuilder classBuilder = new ClassBuilder();
    +    // classBuilder.addToClassPath(".");
    +    final File prJarFile = new File(new File(".").getAbsolutePath(), 
"myPartitionResolver.jar");
    --- End diff --
    
    You should start using TemporaryFolder for stuff like this so the test 
cleans up better after it runs.
    
    ```
      @Rule
      public TemporaryFolder temporaryFolder = new 
SerializableTemporaryFolder();
    ...
        File prJarFile = new File(temporaryFolder.getRoot(), 
"myPartitionResolver.jar");
    
    ```
    PS: SerializableTemporaryFolder is a a DUnit friendly version in 
geode-junit.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to