arina-ielchiieva commented on a change in pull request #2010: DRILL-7620: Fix 
plugin mutability issues
URL: https://github.com/apache/drill/pull/2010#discussion_r387643103
 
 

 ##########
 File path: 
exec/java-exec/src/test/java/org/apache/drill/exec/store/TestPluginRegistry.java
 ##########
 @@ -195,36 +391,90 @@ public void testBasicLifecycle() throws Exception {
       assertSame(plugin1, registry.getPlugin(pConfig1));
 
       // Try to change a system plugin
-      StoragePlugin sysPlugin = registry.getPlugin("sys");
+      StoragePlugin sysPlugin = registry.getPlugin(SYS_PLUGIN_NAME);
       assertNotNull(sysPlugin);
-      FileSystemConfig pConfig3 = new FileSystemConfig("myConn",
-          props, new HashMap<>(), new HashMap<>());
-      pConfig3.setEnabled(true);
+      FileSystemConfig pConfig3 = myConfig2();
       try {
-        registry.put("sys", pConfig3);
+        registry.put(SYS_PLUGIN_NAME, pConfig3);
         fail();
       } catch (UserException e) {
         // Expected
       }
       pConfig3.setEnabled(false);
       try {
-        registry.put("sys", pConfig3);
+        registry.put(SYS_PLUGIN_NAME, pConfig3);
         fail();
       } catch (UserException e) {
         // Expected
       }
-      assertSame(sysPlugin, registry.getPlugin("sys"));
+      assertSame(sysPlugin, registry.getPlugin(SYS_PLUGIN_NAME));
 
       // Try to delete a system plugin
       try {
-        registry.remove("sys");
+        registry.remove(SYS_PLUGIN_NAME);
         fail();
       } catch (UserException e) {
         // Expected
       }
+    }
+  }
+
+  @Test
+  public void testEphemeralWithoutInstance() throws Exception {
+    ClusterFixtureBuilder builder = ClusterFixture.builder(dirTestWatcher);
+    try (ClusterFixture cluster = builder.build();) {
 
 Review comment:
   ```suggestion
       try (ClusterFixture cluster = builder.build()) {
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to