[
https://issues.apache.org/jira/browse/DRILL-6272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16460474#comment-16460474
]
ASF GitHub Bot commented on DRILL-6272:
---------------------------------------
Github user vrozov commented on a diff in the pull request:
https://github.com/apache/drill/pull/1225#discussion_r185384630
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/expr/fn/FunctionInitializerTest.java
---
@@ -43,27 +44,32 @@
import java.util.concurrent.Future;
import java.util.concurrent.atomic.AtomicInteger;
+import static org.apache.drill.test.TestTools.getResourceFile;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.spy;
-@RunWith(MockitoJUnitRunner.class)
@Category(SqlFunctionTest.class)
public class FunctionInitializerTest {
- private static final String CLASS_NAME =
"com.drill.udf.CustomLowerFunction";
+ @ClassRule
+ public static final BaseDirTestWatcher dirTestWatcher = new
BaseDirTestWatcher();
+
+ private static final String CLASS_NAME =
"org.apache.drill.udf.dynamic.CustomLowerFunction";
private static URLClassLoader classLoader;
@BeforeClass
public static void init() throws Exception {
- Path jars = TestTools.WORKING_PATH
- .resolve(TestTools.TEST_RESOURCES)
- .resolve("jars");
- String binaryName = "DrillUDF-1.0.jar";
- String sourceName = JarUtil.getSourceName(binaryName);
- URL[] urls = {jars.resolve(binaryName).toUri().toURL(),
jars.resolve(sourceName).toUri().toURL()};
+ File projectDir = dirTestWatcher.makeSubDir(Paths.get("drill-udf"));
+
FileUtils.copyDirectory(getResourceFile(Paths.get(projectDir.getName())),
projectDir);
--- End diff --
Consider using `<directory>` in pom.xml if the goal here is to avoid
creating files in the `src` path.
> Remove binary jars files from source distribution
> -------------------------------------------------
>
> Key: DRILL-6272
> URL: https://issues.apache.org/jira/browse/DRILL-6272
> Project: Apache Drill
> Issue Type: Task
> Reporter: Vlad Rozov
> Assignee: Arina Ielchiieva
> Priority: Critical
> Fix For: 1.14.0
>
>
> Per [~vrozov] the source distribution contains binary jar files under
> exec/java-exec/src/test/resources/jars
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)