[
https://issues.apache.org/jira/browse/BEAM-3371?focusedWorklogId=145981&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-145981
]
ASF GitHub Bot logged work on BEAM-3371:
----------------------------------------
Author: ASF GitHub Bot
Created on: 20/Sep/18 11:09
Start Date: 20/Sep/18 11:09
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_r219122137
##########
File path:
runners/flink/src/test/java/org/apache/beam/runners/flink/FlinkPipelineExecutionEnvironmentTest.java
##########
@@ -61,4 +76,63 @@ public void processElement(ProcessContext c) throws
Exception {
// no exception should be thrown
}
+
+ @Test
+ public void shouldPrepareFilesToStageWhenFlinkMasterIsSetExplicitly() throws
IOException {
+ FlinkPipelineOptions options =
testPreparingResourcesToStage("localhost:8081");
+
+ assertThat(options.getFilesToStage().size(), is(1));
+ assertThat(options.getFilesToStage().get(0), matches(".*\\.jar"));
+ }
+
+ @Test
+ public void shouldNotPrepareFilesToStageWhenFlinkMasterIsSetToAuto() throws
IOException {
+ FlinkPipelineOptions options = testPreparingResourcesToStage("[auto]");
+
+ assertThat(options.getFilesToStage().size(), is(2));
+ assertThat(options.getFilesToStage(), everyItem(not(matches(".*\\.jar"))));
+ }
+
+ @Test
+ public void shouldNotPrepareFilesToStagewhenFlinkMasterIsSetToCollection()
throws IOException {
+ FlinkPipelineOptions options =
testPreparingResourcesToStage("[collection]");
+
+ assertThat(options.getFilesToStage().size(), is(2));
+ assertThat(options.getFilesToStage(), everyItem(not(matches(".*\\.jar"))));
+ }
+
+ @Test
+ public void shouldNotPrepareFilesToStageWhenFlinkMasterIsSetToLocal() throws
IOException {
+ FlinkPipelineOptions options = testPreparingResourcesToStage("[local]");
Review comment:
These 3 similar tests above could be only one parameterised but not a big
deal for now.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 145981)
Time Spent: 4.5h (was: 4h 20m)
> 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: 4.5h
> 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)