[ https://issues.apache.org/jira/browse/BEAM-3371?focusedWorklogId=143919&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143919 ]
ASF GitHub Bot logged work on BEAM-3371: ---------------------------------------- Author: ASF GitHub Bot Created on: 13/Sep/18 11:05 Start Date: 13/Sep/18 11:05 Worklog Time Spent: 10m Work Description: aromanenko-dev commented on a change in pull request #6244: [BEAM-3371] Enable running integration tests on Spark URL: https://github.com/apache/beam/pull/6244#discussion_r217339091 ########## File path: runners/core-construction-java/src/test/java/org/apache/beam/runners/core/construction/PipelineResourcesTest.java ########## @@ -68,4 +75,42 @@ public void detectClassPathResourceWithNonFileResources() throws Exception { PipelineResources.detectClassPathResourcesToStage(classLoader); } + + @Test + public void testRemovingNonexistentFilesFromFilesToStage() throws IOException { + String nonexistentFilePath = tmpFolder.getRoot().getPath() + "/nonexistent/file"; + String temporaryLocation = tmpFolder.newFolder().getAbsolutePath(); + + List<String> filesToStage = new ArrayList<>(); + filesToStage.add(nonexistentFilePath); + + List<String> result = PipelineResources.prepareFilesForStaging(filesToStage, temporaryLocation); + + assertThat(result, is(empty())); Review comment: Could you add another entry to `filesToStage` list, which is existent path, and assert that it removes ONLY non existent one? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 143919) Time Spent: 1h 40m (was: 1.5h) > Add ability to stage directories with compiled classes to Spark > --------------------------------------------------------------- > > Key: BEAM-3371 > URL: https://issues.apache.org/jira/browse/BEAM-3371 > Project: Beam > Issue Type: Sub-task > Components: runner-spark > Reporter: Lukasz Gajowy > Assignee: Jean-Baptiste Onofré > Priority: Minor > Time Spent: 1h 40m > Remaining Estimate: 0h > > This one is basically the same issue as > [this Flink's one|https://issues.apache.org/jira/browse/BEAM-3370], except > of two things: > - a detection of files to stage has to be provided in Spark, which is already > being developed [here|https://issues.apache.org/jira/browse/BEAM-981] > - the test execution is not interrupted by FileNotFoundException but by *the > effect* of the directory not being staged (absence of test classes on the > Spark's classpath, hence ClassNotFoundException). > Again, this probably could be resolved analogously as in flink, while > BEAM-981 issue is resolved. -- This message was sent by Atlassian JIRA (v7.6.3#76005)