paul-rogers commented on a change in pull request #1988: DRILL-7590: Refactor plugin registry URL: https://github.com/apache/drill/pull/1988#discussion_r384926092
########## File path: exec/java-exec/src/test/java/org/apache/drill/exec/store/TestSystemPluginLocator.java ########## @@ -0,0 +1,72 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.drill.exec.store; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; + +import java.util.Collection; + +import org.apache.drill.exec.store.sys.SystemTablePlugin; +import org.apache.drill.exec.store.sys.SystemTablePluginConfig; +import org.apache.drill.test.OperatorFixture; +import org.junit.Test; + +public class TestSystemPluginLocator extends BasePluginRegistryTest { + + // Uses a null Drillbit context. This is benign for the current + // set of system plugins. If this test fails, check if a system Review comment: This is the only way to test the system plugins at this level. However, I didn't want to start an entire Drillbit just to have a context which is never used. Felt wrong to test low-level code with a dependency on the entire product. As the comment says, the next PR will change the context passed to plugins to a smaller interface (only methods actually used) so it can be created (or mocked) here. At that point, this test will become safe. So, the current code is temporary. ---------------------------------------------------------------- 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
