code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Test
public void twoNodesSuccess() throws Exception {
createNodeInTestDag("a");
createNodeInTestDag("b");
this.dagBuilder.addParentNode("b", "a");
addToExpectedSequence("fa", Status.RUNNING);
addToExpectedSequence("a", Status.RUNNING);
addToExpectedSequence("a", Status.SUCCESS);
addToExpe... | Tests a DAG with two nodes which will run successfully.
a
|
b | twoNodesSuccess | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | Apache-2.0 |
@Test
public void threeNodesSuccess() throws Exception {
createNodeInTestDag("a");
createNodeInTestDag("b");
createNodeInTestDag("c");
this.dagBuilder.addParentNode("b", "a");
this.dagBuilder.addParentNode("c", "a");
addToExpectedSequence("fa", Status.RUNNING);
addToExpectedSequence("a", ... | Tests a DAG with three nodes which will run successfully.
<pre>
a
/ \
b c
</pre> | threeNodesSuccess | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | Apache-2.0 |
@Test
public void oneNodeFailure() throws Exception {
createNodeInTestDag("a");
this.nodesToFail.add("a");
addToExpectedSequence("fa", Status.RUNNING);
addToExpectedSequence("a", Status.RUNNING);
addToExpectedSequence("a", Status.FAILURE);
addToExpectedSequence("fa", Status.FAILURE);
buil... | Tests a DAG with one node which will fail. | oneNodeFailure | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | Apache-2.0 |
@Test
public void twoNodesFailFirst() throws Exception {
createNodeInTestDag("a");
createNodeInTestDag("b");
this.dagBuilder.addParentNode("b", "a");
this.nodesToFail.add("a");
addToExpectedSequence("fa", Status.RUNNING);
addToExpectedSequence("a", Status.RUNNING);
addToExpectedSequence("... | Tests a DAG with two nodes, fails the first one.
Expects the child node to be marked canceled.
a (fail)
|
b | twoNodesFailFirst | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | Apache-2.0 |
@Test
public void threeNodesFailSecond() throws Exception {
createNodeInTestDag("a");
createNodeInTestDag("b");
createNodeInTestDag("c");
this.dagBuilder.addParentNode("b", "a");
this.dagBuilder.addParentNode("c", "a");
this.nodesToFail.add("b");
addToExpectedSequence("fa", Status.RUNNING... | Tests a DAG with three nodes with one failure.
Expects the sibling nodes to finish.
<pre>
a
/ \
b (fail) c
</pre> | threeNodesFailSecond | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | Apache-2.0 |
@Test
public void simple_sub_dag_success_case() throws Exception {
final TestSubDagProcessor testSubDagProcessor = new TestSubDagProcessor
(this.dagService, this.statusChangeRecorder);
final DagBuilder subDagBuilder = new DagBuilder("fb", testSubDagProcessor);
subDagBuilder.createNode("a", this.no... | Tests a DAG with one subDag, all successful.
<pre>
sfb
|
c
subDag: fb
a b
</pre> | simple_sub_dag_success_case | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | Apache-2.0 |
private void createNodeInTestDag(final String name) {
this.dagBuilder.createNode(name, this.nodeProcessor);
} | Creates a node and add to the test dag. | createNodeInTestDag | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagServiceTest.java | Apache-2.0 |
@Test
public void dag_finish_with_only_disabled_nodes() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.DISABLED);
this.testFlow.start();
assertThat(aNode.getStatus()).isEqualTo(Status.DISABLED);
assertThat(this.testFlow.getStatus()).isEqualTo(Status.SUCCESS);
} | Tests the dag state ( including its nodes' states) transitions.
Focuses on how the dag state changes in response to one external request. | dag_finish_with_only_disabled_nodes | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void running_nodes_can_be_killed() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.RUNNING);
this.testFlow.setStatus(Status.RUNNING);
this.testFlow.kill();
assertThat(aNode.getStatus()).isEqualTo(Status.KILLING);
assertThat(this.testFlow.getStatus()).isEqualTo(S... | Tests the dag state ( including its nodes' states) transitions.
Focuses on how the dag state changes in response to one external request. | running_nodes_can_be_killed | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void kill_node_in_terminal_state_should_have_no_effect() {
for (final Status status : Status.TERMINAL_STATES) {
kill_dag_in_this_state_should_have_no_effect(status);
}
} | Tests the dag state ( including its nodes' states) transitions.
Focuses on how the dag state changes in response to one external request. | kill_node_in_terminal_state_should_have_no_effect | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void kill_node_in_killing_state_should_have_no_effect() {
kill_dag_in_this_state_should_have_no_effect(Status.KILLING);
} | Tests the dag state ( including its nodes' states) transitions.
Focuses on how the dag state changes in response to one external request. | kill_node_in_killing_state_should_have_no_effect | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
private void kill_dag_in_this_state_should_have_no_effect(final Status status) {
// given
this.testFlow.setStatus(status);
// when
this.testFlow.kill();
// then
assertThat(this.testFlow.getStatus()).isEqualTo(status);
verify(this.mockDagProcessor, never()).changeStatus(any(), any());
} | Tests the dag state ( including its nodes' states) transitions.
Focuses on how the dag state changes in response to one external request. | kill_dag_in_this_state_should_have_no_effect | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void waiting_nodes_are_canceled_when_killed() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.RUNNING);
final Node bNode = createAndAddNode("b");
bNode.addParent(aNode);
this.testFlow.setStatus(Status.RUNNING);
this.testFlow.kill();
assertThat(aNode.getStatu... | Tests ready nodes are canceled when the dag is killed. | waiting_nodes_are_canceled_when_killed | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void multiple_waiting_nodes_are_canceled_when_killed() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.RUNNING);
final Node bNode = createAndAddNode("b");
bNode.addParent(aNode);
final Node cNode = createAndAddNode("c");
cNode.addParent(aNode);
final Node dN... | Tests multiple ready nodes are canceled when the dag is killed.
<pre>
a (running)
/ \
b c
\
d
</pre> | multiple_waiting_nodes_are_canceled_when_killed | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void multiple_waiting_children_are_canceled_when_parent_failed() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.RUNNING);
final Node bNode = createAndAddNode("b");
bNode.addParent(aNode);
final Node cNode = createAndAddNode("c");
cNode.addParent(bNode);
th... | Tests multiple ready nodes are canceled when the parent node failed.
<pre>
a (running)
|
b
|
c
</pre> | multiple_waiting_children_are_canceled_when_parent_failed | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void blocked_nodes_are_canceled_when_killed() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.RUNNING);
final Node bNode = createAndAddNode("b");
bNode.addParent(aNode);
bNode.setStatus(Status.BLOCKED);
this.testFlow.setStatus(Status.RUNNING);
this.testFlow.... | Tests blocked nodes are canceled when the dag is killed. | blocked_nodes_are_canceled_when_killed | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void success_node_state_remain_the_same_when_killed() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.SUCCESS);
final Node bNode = createAndAddNode("b");
bNode.setStatus(Status.RUNNING);
bNode.addParent(aNode);
this.testFlow.kill();
assertThat(aNode.getStatu... | Tests success nodes' states remain the same when the dag is killed.
<pre>
a (success)
/
b (running)
</pre> | success_node_state_remain_the_same_when_killed | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
@Test
public void failed_node_state_remain_the_same_when_killed() {
final Node aNode = createAndAddNode("a");
aNode.setStatus(Status.RUNNING);
final Node bNode = createAndAddNode("b");
bNode.setStatus(Status.FAILURE);
this.testFlow.kill();
assertThat(aNode.getStatus()).isEqualTo(Status.KILLING... | Tests failed nodes' states remain the same when the dag is killed.
This can happen when running jobs are allowed to finish when a node fails.
<pre>
a (running) b (failure)
</pre> | failed_node_state_remain_the_same_when_killed | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
private Node createAndAddNode(final String name) {
final Node node = TestUtil.createNodeWithNullProcessor(name, this.testFlow);
this.testFlow.addNode(node);
return node;
} | Creates a node and add to the test dag.
@param name node name
@return Node object | createAndAddNode | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/DagTest.java | Apache-2.0 |
void recordNode(final Node node) {
this.sequence.add(new Pair<>(node.getName(), node.getStatus()));
} | Records the sequence of nodes and dag status change. | recordNode | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/StatusChangeRecorder.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/StatusChangeRecorder.java | Apache-2.0 |
void recordDag(final Dag dag) {
this.sequence.add(new Pair<>(dag.getName(), dag.getStatus()));
} | Records the sequence of nodes and dag status change. | recordDag | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/StatusChangeRecorder.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/StatusChangeRecorder.java | Apache-2.0 |
private void assertMapSizeMatchEnumSize(
final Map<Status, Boolean> map) {
final int mapSize = map.size();
final int enumSize = Status.values().length;
assertThat(enumSize).isEqualTo(mapSize);
} | Asserts the given map contains the same number of entries as the number of values of the {@link
Status} has.
@param map a map that contains status and its associated boolean value | assertMapSizeMatchEnumSize | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/StatusTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/StatusTest.java | Apache-2.0 |
@Override
public void changeStatus(final Node node, final Status status) {
System.out.println(node);
this.statusChangeRecorder.recordNode(node);
switch (node.getStatus()) {
case RUNNING:
// Don't mark the job finished. Simulate a long running job.
this.nodeRunningLatch.countDown();
... | A node processor that tests killing a node.
@param nodeRunningLatch signal that the node has started running | changeStatus | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/TestKillNodeProcessor.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/TestKillNodeProcessor.java | Apache-2.0 |
@Override
public void changeStatus(final Node node, final Status status) {
System.out.println(node);
this.statusChangeRecorder.recordNode(node);
switch (status) {
case RUNNING:
//Discover the node in the parent Dag this subDag is associated with.
//This allows the subtag processor t... | Triggers the sub DAG state change when the sub DAG node in the parent DAG's status changes.
@param node the node to change
@param status the new status | changeStatus | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/TestSubDagNodeProcessor.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/TestSubDagNodeProcessor.java | Apache-2.0 |
@Override
public void changeStatus(final Dag dag, final Status status) {
System.out.println(dag);
this.statusChangeRecorder.recordDag(dag);
requireNonNull(this.node, "Node for the subDag in the parent DAG can't be null.");
switch (status) {
case SUCCESS:
this.dagService.markNodeSuccess(t... | Transfers the node state in the parent DAG when the sub DAG status changes.
@param dag the dag to change
@param status the new status | changeStatus | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/TestSubDagProcessor.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/TestSubDagProcessor.java | Apache-2.0 |
public void setNode(final Node node) {
this.node = node;
} | Sets the node that this subflow belongs.
<p>
Can't pass this information in the constructor since it will cause a circular dependency
problem.
@param node the node as part of the parent flow | setNode | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/TestSubDagProcessor.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/TestSubDagProcessor.java | Apache-2.0 |
static Node createNodeWithNullProcessor(final String name, final Dag dag) {
return new Node(name, mock(NodeProcessor.class), dag);
} | Creates a node with a processor that does nothing.
@param name node name | createNodeWithNullProcessor | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/dag/TestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/dag/TestUtil.java | Apache-2.0 |
@Ignore
@Test
public void runFlowOnArbitraryCondition() throws Exception {
final HashMap<String, String> flowProps = new HashMap<>();
setUp(CONDITIONAL_FLOW_7, flowProps);
final ExecutableFlow flow = this.runner.getExecutableFlow();
assertStatus(flow, "jobA", Status.SUCCEEDED);
assertStatus(flow... | JobB has defined "condition: var fImport = new JavaImporter(java.io.File); with(fImport) { var
f = new File('new'); f.createNewFile(); }"
Null ProtectionDomain will restrict this arbitrary code from creating a new file.
However it will not kick in when the change for condition whitelisting is implemented.
As a result, ... | runFlowOnArbitraryCondition | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalFlowTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalFlowTest.java | Apache-2.0 |
private void setUp(final String flowName, final HashMap<String, String> flowProps)
throws Exception {
final String flowYamlFile = flowName + ".flow";
when(this.testUtil.getProjectLoader()
.getLatestFlowVersion(this.project.getId(), this.project.getVersion(), flowYamlFile))
.thenReturn(1);
... | JobB has defined "condition: var fImport = new JavaImporter(java.io.File); with(fImport) { var
f = new File('new'); f.createNewFile(); }"
Null ProtectionDomain will restrict this arbitrary code from creating a new file.
However it will not kick in when the change for condition whitelisting is implemented.
As a result, ... | setUp | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalFlowTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalFlowTest.java | Apache-2.0 |
@Ignore
@Test
public void runFlowOnArbitraryCondition() throws Exception {
final HashMap<String, String> flowProps = new HashMap<>();
setUp(CONDITIONAL_FLOW_7, flowProps, "jobD");
final ExecutableFlow flow = this.runner.getExecutableFlow();
assertStatus(flow, "jobA", Status.SUCCEEDED);
assertSta... | JobB has defined "condition: var fImport = new JavaImporter(java.io.File); with(fImport) { var
f = new File('new'); f.createNewFile(); }"
Null ProtectionDomain will restrict this arbitrary code from creating a new file.
However it will not kick in when the change for condition allow-listing is implemented.
As a result,... | runFlowOnArbitraryCondition | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalJobsTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalJobsTest.java | Apache-2.0 |
private void setUp(final String flowName, final HashMap<String, String> flowProps, String rootJob)
throws Exception {
String dir = FLOW_DIR + "/" + flowName;
this.testUtil = new FlowRunnerTestUtil(dir, this.temporaryFolder);
if (System.getSecurityManager() == null) {
Policy.setPolicy(new Policy(... | JobB has defined "condition: var fImport = new JavaImporter(java.io.File); with(fImport) { var
f = new File('new'); f.createNewFile(); }"
Null ProtectionDomain will restrict this arbitrary code from creating a new file.
However it will not kick in when the change for condition allow-listing is implemented.
As a result,... | setUp | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalJobsTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalJobsTest.java | Apache-2.0 |
@Override
public boolean implies(final ProtectionDomain domain, final Permission permission) {
return true; // allow all
} | JobB has defined "condition: var fImport = new JavaImporter(java.io.File); with(fImport) { var
f = new File('new'); f.createNewFile(); }"
Null ProtectionDomain will restrict this arbitrary code from creating a new file.
However it will not kick in when the change for condition allow-listing is implemented.
As a result,... | implies | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalJobsTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerConditionalJobsTest.java | Apache-2.0 |
@Before
public void setUp() throws Exception {
this.testUtil = new FlowRunnerTestUtil("embedded2", this.temporaryFolder);
} | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | setUp | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testBasicPipelineLevel1RunDisabledJobs() throws Exception {
final FlowRunner previousRunner = this.testUtil.createFromFlowMap("jobf", "prev");
final ExecutionOptions options = new ExecutionOptions();
options.setPipelineExecutionId(previousRunner.getExecutableFlow()
.getExecution... | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | testBasicPipelineLevel1RunDisabledJobs | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testBasicPipelineLevel1Run() throws Exception {
final FlowRunner previousRunner = this.testUtil.createFromFlowMap("jobf", "prev");
final ExecutionOptions options = new ExecutionOptions();
options.setPipelineExecutionId(previousRunner.getExecutableFlow()
.getExecutionId());
o... | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | testBasicPipelineLevel1Run | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testBasicPipelineLevel2Run() throws Exception {
final FlowRunner previousRunner = this.testUtil.createFromFlowMap("pipelineFlow", "prev");
final ExecutionOptions options = new ExecutionOptions();
options.setPipelineExecutionId(previousRunner.getExecutableFlow()
.getExecutionId()... | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | testBasicPipelineLevel2Run | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testBasicPipelineLevel2Run2() throws Exception {
final FlowRunner previousRunner = this.testUtil.createFromFlowMap("pipeline1_2", "prev");
final ExecutionOptions options = new ExecutionOptions();
options.setPipelineExecutionId(previousRunner.getExecutableFlow()
.getExecutionId()... | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | testBasicPipelineLevel2Run2 | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testBasicPipelineLevel3RunWithDisabledSubFlows() throws Exception {
// disable either sub-flow in each execution: pipelineEmbeddedFlow4 or pipelineEmbeddedFlow3
final ExecutionOptions prevOptions = new ExecutionOptions();
prevOptions.setDisabledJobs(Arrays.asList(new DisabledJob("pipeli... | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | testBasicPipelineLevel3RunWithDisabledSubFlows | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testBasicPipelineLevel3RunWithMoreDisabledJobs() throws Exception {
// disable either sub-flow in each execution: pipelineEmbeddedFlow4 or pipelineEmbeddedFlow3
// also disable pipeline1 & pipeline2 in both flows so that the first job that should be blocked
// is actually inside a sub-fl... | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | testBasicPipelineLevel3RunWithMoreDisabledJobs | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testBasicPipelineLevel3Run() throws Exception {
final FlowRunner previousRunner = this.testUtil.createFromFlowMap("pipelineFlow", "prev");
final ExecutionOptions options = new ExecutionOptions();
options.setPipelineExecutionId(previousRunner.getExecutableFlow()
.getExecutionId()... | Flows in this test: joba jobb joba1 jobc->joba jobd->joba jobe->jobb,jobc,jobd jobf->jobe,joba1
<p>
jobb = innerFlow innerJobA innerJobB->innerJobA innerJobC->innerJobB
innerFlow->innerJobB,innerJobC
<p>
jobd=innerFlow2 innerFlow2->innerJobA
@author rpark | testBasicPipelineLevel3Run | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPipelineTest.java | Apache-2.0 |
@Test
public void testFlow1_0RuntimePropertyResolution() throws Exception {
this.testUtil = new FlowRunnerTestUtil(FlowRunnerPropertyResolutionTest.EXEC_FLOW_DIR,
this.temporaryFolder);
assertProperties();
} | Test the property resolution of jobs in a flow.
<p>
The tests are contained in execpropstest, and should be resolved in the following fashion, where
the later props take precedence over the previous ones.
<p>
1. Global props (set in the FlowRunner) 2. Shared job props (depends on job directory) 3. Flow
Override propert... | testFlow1_0RuntimePropertyResolution | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | Apache-2.0 |
@Test
public void testFlow1_0RuntimePropertyResolutionWithHighestPrecedenceToRuntimePropsEnabled()
throws Exception {
this.testUtil = new FlowRunnerTestUtil(FlowRunnerPropertyResolutionTest.EXEC_FLOW_DIR,
this.temporaryFolder);
assertPropertiesWithHighestPrecedenceToRuntimePropsEnabled();
} | Test the property resolution of jobs in a flow.
<p>
The tests are contained in execpropstest, and should be resolved in the following fashion, where
the later props take precedence over the previous ones.
<p>
1. Global props (set in the FlowRunner) 2. Shared job props (depends on job directory) 3. Flow
Override propert... | testFlow1_0RuntimePropertyResolutionWithHighestPrecedenceToRuntimePropsEnabled | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | Apache-2.0 |
@Test
public void testFlow2_0RuntimePropertyResolution() throws Exception {
this.testUtil = new FlowRunnerTestUtil(FlowRunnerPropertyResolutionTest.FLOW_YAML_DIR,
this.temporaryFolder);
final Project project = this.testUtil.getProject();
when(this.testUtil.getProjectLoader().isFlowFileUploaded(pro... | Test the property resolution of jobs in a flow.
<p>
The tests are contained in execpropstest, and should be resolved in the following fashion, where
the later props take precedence over the previous ones.
<p>
1. Global props (set in the FlowRunner) 2. Shared job props (depends on job directory) 3. Flow
Override propert... | testFlow2_0RuntimePropertyResolution | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | Apache-2.0 |
@Test
public void testFlow2_0RuntimePropertyResolutionWithHighestPrecedenceToRuntimePropsEnabled()
throws Exception {
this.testUtil = new FlowRunnerTestUtil(FlowRunnerPropertyResolutionTest.FLOW_YAML_DIR,
this.temporaryFolder);
final Project project = this.testUtil.getProject();
when(this.te... | Test the property resolution of jobs in a flow.
<p>
The tests are contained in execpropstest, and should be resolved in the following fashion, where
the later props take precedence over the previous ones.
<p>
1. Global props (set in the FlowRunner) 2. Shared job props (depends on job directory) 3. Flow
Override propert... | testFlow2_0RuntimePropertyResolutionWithHighestPrecedenceToRuntimePropsEnabled | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | Apache-2.0 |
private void assertProperties() throws Exception {
final HashMap<String, String> rootFlowNodeRuntimeProps = new HashMap<>();
rootFlowNodeRuntimeProps.put("props7", "execflow7");
rootFlowNodeRuntimeProps.put("props6", "execflow6");
rootFlowNodeRuntimeProps.put("props5", "execflow5");
rootFlowNodeRunt... | Test the property resolution of jobs in a flow.
<p>
The tests are contained in execpropstest, and should be resolved in the following fashion, where
the later props take precedence over the previous ones.
<p>
1. Global props (set in the FlowRunner) 2. Shared job props (depends on job directory) 3. Flow
Override propert... | assertProperties | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | Apache-2.0 |
private void assertPropertiesWithHighestPrecedenceToRuntimePropsEnabled() throws Exception {
final HashMap<String, String> rootFlowNodeRuntimeProps = new HashMap<>();
rootFlowNodeRuntimeProps.put("props7", "execflow7");
rootFlowNodeRuntimeProps.put("props6", "execflow6");
rootFlowNodeRuntimeProps.put("p... | Test the property resolution of jobs in a flow.
<p>
The tests are contained in execpropstest, and should be resolved in the following fashion, where
the later props take precedence over the previous ones.
<p>
1. Global props (set in the FlowRunner) 2. Shared job props (depends on job directory) 3. Flow
Override propert... | assertPropertiesWithHighestPrecedenceToRuntimePropsEnabled | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | Apache-2.0 |
private void createNodeMap(final ExecutableFlowBase flow,
final Map<String, ExecutableNode> nodeMap) {
for (final ExecutableNode node : flow.getExecutableNodes()) {
nodeMap.put(node.getNestedId(), node);
if (node instanceof ExecutableFlowBase) {
createNodeMap((ExecutableFlowBase) node, no... | Test the property resolution of jobs in a flow.
<p>
The tests are contained in execpropstest, and should be resolved in the following fashion, where
the later props take precedence over the previous ones.
<p>
1. Global props (set in the FlowRunner) 2. Shared job props (depends on job directory) 3. Flow
Override propert... | createNodeMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerPropertyResolutionTest.java | Apache-2.0 |
@Before
public void setUp() throws Exception {
this.testUtil = new FlowRunnerTestUtil("embedded2", this.temporaryFolder);
} | Test the flow run, especially with embedded flows.
This test uses executions/embedded2. It also mainly uses the flow named jobf. The test is
designed to control success/failures explicitly so we don't have to time the flow exactly.
Flow jobf looks like the following:
<pre>
joba joba1
/ | \ |
... | setUp | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testBasicRun() throws Exception {
final Map<String, String> flowParams = new HashMap<>();
flowParams.put("param4", "override.4");
flowParams.put("param10", "override.10");
flowParams.put("param11", "override.11");
final ExecutionOptions options = new ExecutionOptions();
opti... | Tests the basic successful flow run, and also tests all output variables from each job. | testBasicRun | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testDisabledNormal() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
final ExecutableFlow flow = this.runner.getExecutableFlow();
flow.getExecutableNode("jobb").setStatus(Status.DISABLED);
((ExecutableFlowBase) flow.ge... | Tests a flow with Disabled jobs and flows. They should properly SKIP executions | testDisabledNormal | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testNormalFailure1() throws Exception {
// Test propagation of KILLED status to embedded flows.
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After it starts up, on... | Tests a failure with the default FINISH_CURRENTLY_RUNNING. After the first failure, every job
that started should complete, and the rest of the jobs should be skipped. | testNormalFailure1 | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testNormalFailure2() throws Exception {
// Test propagation of KILLED status to embedded flows different branch
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After ... | Test #2 on the default failure case. | testNormalFailure2 | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testNormalFailure3() throws Exception {
// Test propagation of CANCELLED status to embedded flows different branch
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// Aft... | Test #2 on the default failure case. | testNormalFailure3 | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testFailedFinishingFailure3() throws Exception {
// Test propagation of KILLED status to embedded flows different branch
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_ALL_POSSIBLE);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// Af... | Tests failures when the fail behaviour is FINISH_ALL_POSSIBLE. In this case, all jobs which
have had its pre-requisite met can continue to run. Finishes when the failure is propagated to
the last node of the flow. | testFailedFinishingFailure3 | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testCancelOnFailure() throws Exception {
// Test propagation of KILLED status to embedded flows different branch
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.CANCEL_ALL);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After it starts up,... | Tests the failure condition when a failure invokes a cancel (or killed) on the flow.
Any jobs that are running will be assigned a KILLED state, and any nodes which were skipped due
to prior errors will be given a CANCELLED state. | testCancelOnFailure | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testCancel() throws Exception {
// Test propagation of KILLED status to embedded flows different branch
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.CANCEL_ALL);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After it starts up, only job... | Tests the manual Killing of a flow. In this case, the flow is just fine before the cancel is
called. | testCancel | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testManualCancelOnFailure() throws Exception {
// Test propagation of KILLED status to embedded flows different branch
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
//... | Tests the manual invocation of cancel on a flow that is FAILED_FINISHING | testManualCancelOnFailure | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testPause() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After it starts up, only joba should be running
assertStatus("joba", Status.RUNNING);
... | Tests that pause and resume work | testPause | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testPauseKill() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After it starts up, only joba should be running
assertStatus("joba", Status.RUNNING... | Test the condition for a manual invocation of a KILL (cancel) on a flow that has been paused.
The flow should unpause and be killed immediately. | testPauseKill | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testPauseFail() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_CURRENTLY_RUNNING);
final EventCollectorListener eventCollector = new EventCollectorListener();
this.runner.addListener(eventCollector);
// 1. START FLOW
FlowRunnerTestU... | Tests the case where a failure occurs on a Paused flow. In this case, the flow should stay
paused. | testPauseFail | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testPauseFailFinishAll() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_ALL_POSSIBLE);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After it starts up, only joba should be running
assertStatus("joba", Status.RUN... | Test the condition when a Finish all possible is called during a pause. The Failure is not
acted upon until the flow is resumed. | testPauseFailFinishAll | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testFlowKilledByJobLevelSLA() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.CANCEL_ALL);
FlowRunnerTestUtil.startThread(this.runner);
assertStatus("joba", Status.RUNNING);
assertStatus("joba1", Status.RUNNING);
for (final JobRunner jobRu... | Tests the case when a job is killed by SLA causing a flow to fail. The flow should be in
"killed" status. | testFlowKilledByJobLevelSLA | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testPauseFailKill() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.CANCEL_ALL);
// 1. START FLOW
FlowRunnerTestUtil.startThread(this.runner);
// After it starts up, only joba should be running
assertStatus("joba", Status.RUNNING);
asse... | Tests the case when a flow is paused and a failure causes a kill. The flow should die
immediately regardless of the 'paused' status. | testPauseFailKill | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
@Test
public void testKillBeforeStart() throws Exception {
this.runner = this.testUtil.createFromFlowMap("jobf", FailureAction.FINISH_ALL_POSSIBLE);
this.runner.addListener((event) -> {
if (event.getType().equals(EventType.FLOW_STARTED)) {
// kill interrupts the current thread which would cause ... | Tests the case when an execution is killed before it has started. The final execution
status should "KILLED". | testKillBeforeStart | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTest2.java | Apache-2.0 |
public static Map<String, Flow> prepareProject(final Project project, final File sourceDir,
final File workingDir)
throws ProjectManagerException, IOException {
final FlowLoaderFactory loaderFactory = new FlowLoaderFactory(new Props(null));
final FlowLoader loader = loaderFactory.createFlowLoader(so... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | prepareProject | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public static void waitEventFired(final EventCollectorListener eventCollector,
final String nestedId, final Status status)
throws InterruptedException {
for (int i = 0; i < 1000; i++) {
for (final Event event : eventCollector.getEventList()) {
if (event.getData().getStatus() == status && e... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | waitEventFired | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public static ExecutableFlow prepareExecDir(final File workingDir, final File execDir,
final String flowName, final int execId) throws IOException {
FileUtils.copyDirectory(execDir, workingDir);
final File jsonFlowFile = new File(workingDir, flowName + ".flow");
final Object flowObj = JSONUtils.parseJ... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | prepareExecDir | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public static Thread startThread(final FlowRunner runner) {
final Thread thread = new Thread(runner);
thread.start();
return thread;
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | startThread | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowFile(final String flowName) throws Exception {
return createFromFlowFile(new EventCollectorListener(), flowName);
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowFile | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowFile(final EventCollectorListener eventCollector,
final String flowName) throws Exception {
return createFromFlowFile(flowName, eventCollector, new ExecutionOptions());
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowFile | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowFile(final String flowName,
final EventCollectorListener eventCollector, final ExecutionOptions options)
throws Exception {
return createFromFlowFile(flowName, eventCollector, options, null, null);
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowFile | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowFile(final String flowName, final FlowWatcher watcher,
final Integer pipeline) throws Exception {
return createFromFlowFile(flowName, new EventCollectorListener(), new ExecutionOptions(),
watcher, pipeline);
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowFile | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowFile(final String flowName,
final EventCollectorListener eventCollector,
final ExecutionOptions options, final FlowWatcher watcher, final Integer pipeline)
throws Exception {
final ExecutableFlow exFlow = FlowRunnerTestUtil
.prepareExecDir(this.workingDir, t... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowFile | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowMap(final String flowName, final String jobIdPrefix)
throws Exception {
return createFromFlowMap(flowName, jobIdPrefix, new ExecutionOptions());
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowMap(final String flowName, final String jobIdPrefix,
final ExecutionOptions options)
throws Exception {
return createFromFlowMap(flowName, jobIdPrefix, options, new Props());
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowMap(final String flowName,
final HashMap<String, String> flowParams) throws Exception {
return createFromFlowMap(null, flowName, null, flowParams, new Props(),
mock(AlerterHolder.class));
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowMap(final String flowName, final ExecutionOptions options,
final Map<String, String> flowParams, final Props azkabanProps) throws Exception {
return createFromFlowMap(null, flowName, options, flowParams,
azkabanProps, mock(AlerterHolder.class));
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowMap(final EventCollectorListener eventCollector,
final String flowName, final ExecutionOptions options, final Map<String, String> flowParams,
final Props azkabanProps, final AlerterHolder alerterHolder) throws Exception {
LOG.info("Creating a FlowRunner for flow '" + flow... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public FlowRunner createFromFlowMap(final String flowName, final FailureAction action)
throws Exception {
final ExecutionOptions options = new ExecutionOptions();
options.setFailureAction(action);
return createFromFlowMap(flowName, options, new HashMap<>(), new Props());
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
private FlowRunner createFromFlowMap(final String flowName, final String jobIdPrefix,
final ExecutionOptions options, final Props azkabanProps) throws Exception {
final Map<String, String> flowParams = new HashMap<>();
flowParams.put(InteractiveTestJob.JOB_ID_PREFIX, jobIdPrefix);
return createFromFlo... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromFlowMap | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
private FlowRunner createFromExecutableFlow(final EventCollectorListener eventCollector,
final ExecutableFlow exFlow, final ExecutionOptions options,
final Map<String, String> flowParams, final Props azkabanProps,
final AlerterHolder alerterHolder) throws Exception {
final int exId = id++;
exF... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createFromExecutableFlow | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public ExecutorLoader getExecutorLoader() {
return this.executorLoader;
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | getExecutorLoader | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public void setExecutorLoader(final MockExecutorLoader executorLoader) {
this.executorLoader = executorLoader;
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | setExecutorLoader | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public ProjectLoader getProjectLoader() {
return this.projectLoader;
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | getProjectLoader | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public Project getProject() {
return this.project;
} | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | getProject | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
public VersionSet createVersionSet() {
final String testJsonString1 = "{\"azkaban-base\":{\"version\":\"7.0.4\",\"path\":\"path1\","
+ "\"state\":\"ACTIVE\"},\"azkaban-config\":{\"version\":\"9.1.1\",\"path\":\"path2\","
+ "\"state\":\"ACTIVE\"},\"spark\":{\"version\":\"8.0\",\"path\":\"path3\","
... | Initialize the project with the flow definitions stored in the given source directory. Also
copy the source directory to the working directory.
@param project project to initialize
@param sourceDir the source dir
@param workingDir the working dir
@return the flow name to flow map
@throws ProjectManagerException th... | createVersionSet | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerTestUtil.java | Apache-2.0 |
@Ignore
@Test
public void testKillBasicFlowWithoutEndNode() throws Exception {
setUp(BASIC_FLOW_YAML_DIR, BASIC_FLOW_YAML_FILE);
final HashMap<String, String> flowProps = new HashMap<>();
this.runner = this.testUtil.createFromFlowMap(BASIC_FLOW_NAME, flowProps);
final ExecutableFlow flow = this.runn... | There seems to be an actual race condition bug in the runtime code. See: issue #1921: Flaky
test FlowRunnerTestYaml & issue #1311: Potential race condition between flowRunner thread and
jetty killing thread. Disable this test until the potential bug is fixed or new DAG engine
code is ready. | testKillBasicFlowWithoutEndNode | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | Apache-2.0 |
@Ignore
@Test
public void testFailBasicFlowWithoutEndNode() throws Exception {
setUp(FAIL_BASIC_FLOW_YAML_DIR, FAIL_BASIC_FLOW_YAML_FILE);
final HashMap<String, String> flowProps = new HashMap<>();
this.runner = this.testUtil.createFromFlowMap(FAIL_BASIC_FLOW_NAME, flowProps);
final ExecutableFlow f... | There seems to be an actual race condition bug in the runtime code. See: issue #1921: Flaky
test FlowRunnerTestYaml & issue #1311: Potential race condition between flowRunner thread and
jetty killing thread. Disable this test until the potential bug is fixed or new DAG engine
code is ready. | testFailBasicFlowWithoutEndNode | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | Apache-2.0 |
@Test
public void testEmbeddedFlowWithoutEndNode() throws Exception {
setUp(EMBEDDED_FLOW_YAML_DIR, EMBEDDED_FLOW_YAML_FILE);
final HashMap<String, String> flowProps = new HashMap<>();
this.runner = this.testUtil.createFromFlowMap(EMBEDDED_FLOW_NAME, flowProps);
final ExecutableFlow flow = this.runner... | There seems to be an actual race condition bug in the runtime code. See: issue #1921: Flaky
test FlowRunnerTestYaml & issue #1311: Potential race condition between flowRunner thread and
jetty killing thread. Disable this test until the potential bug is fixed or new DAG engine
code is ready. | testEmbeddedFlowWithoutEndNode | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | Apache-2.0 |
@Test
public void testAlertOnFlowFinished() throws Exception {
setUp(ALERT_FLOW_YAML_DIR, ALERT_FLOW_YAML_FILE);
final Emailer emailAlerter = mock(Emailer.class);
final Props azkabanProps = new Props();
azkabanProps.put(ConfigurationKeys.AZKABAN_EXECUTION_DISPATCH_METHOD, "POLL");
final AlerterHo... | There seems to be an actual race condition bug in the runtime code. See: issue #1921: Flaky
test FlowRunnerTestYaml & issue #1311: Potential race condition between flowRunner thread and
jetty killing thread. Disable this test until the potential bug is fixed or new DAG engine
code is ready. | testAlertOnFlowFinished | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | Apache-2.0 |
@Test
public void testAlertOnFirstError() throws Exception {
setUp(ALERT_FLOW_YAML_DIR, ALERT_FLOW_YAML_FILE);
final Emailer emailAlerter = mock(Emailer.class);
final Props azkabanProps = new Props();
azkabanProps.put(ConfigurationKeys.AZKABAN_EXECUTION_DISPATCH_METHOD, "POLL");
final AlerterHold... | There seems to be an actual race condition bug in the runtime code. See: issue #1921: Flaky
test FlowRunnerTestYaml & issue #1311: Potential race condition between flowRunner thread and
jetty killing thread. Disable this test until the potential bug is fixed or new DAG engine
code is ready. | testAlertOnFirstError | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | Apache-2.0 |
private void setUp(final String projectDir, final String flowYamlFile) throws Exception {
this.testUtil = new FlowRunnerTestUtil(projectDir, this.temporaryFolder);
final Project project = this.testUtil.getProject();
when(this.testUtil.getProjectLoader()
.getLatestFlowVersion(project.getId(), project... | There seems to be an actual race condition bug in the runtime code. See: issue #1921: Flaky
test FlowRunnerTestYaml & issue #1311: Potential race condition between flowRunner thread and
jetty killing thread. Disable this test until the potential bug is fixed or new DAG engine
code is ready. | setUp | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/FlowRunnerYamlTest.java | Apache-2.0 |
private VersionSet createVersionSet(){
final String testJsonString1 = "{\"azkaban-base\":{\"version\":\"7.0.4\",\"path\":\"path1\","
+ "\"state\":\"ACTIVE\"},\"azkaban-config\":{\"version\":\"9.1.1\",\"path\":\"path2\","
+ "\"state\":\"ACTIVE\"},\"spark\":{\"version\":\"8.0\",\"path\":\"path3\","
... | Creates a new version set from scratch
@return a new version set | createVersionSet | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/JobRunnerTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/JobRunnerTest.java | Apache-2.0 |
@Test
/**
* Deleting everything in the cache to accommodate new item.
*/
public void testDeletingAll() {
final ProjectCacheCleaner cleaner = new ProjectCacheCleaner(this.cacheDir, 0.3);
cleaner.deleteProjectDirsIfNecessary(7000000);
cleaner.finishPendingCleanup();
assertThat(this.cacheDir.lis... | There's still space in the cache, no deletion. | testDeletingAll | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | Apache-2.0 |
@Test
/**
* Deleting two least recently used items in the cache to accommodate new item.
*/
public void testDeletingTwoLRUItems() {
final ProjectCacheCleaner cleaner = new ProjectCacheCleaner(this.cacheDir, 0.7);
cleaner.deleteProjectDirsIfNecessary(3000000);
cleaner.finishPendingCleanup();
as... | Deleting everything in the cache to accommodate new item. | testDeletingTwoLRUItems | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | Apache-2.0 |
@Test
/**
* Deleting the least recently used item in the cache to accommodate new item.
*/
public void testDeletingOneLRUItem() {
final ProjectCacheCleaner cleaner = new ProjectCacheCleaner(this.cacheDir, 0.7);
cleaner.deleteProjectDirsIfNecessary(2000000);
cleaner.finishPendingCleanup();
asse... | Deleting two least recently used items in the cache to accommodate new item. | testDeletingOneLRUItem | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | Apache-2.0 |
@Test
/**
* Put enough items in the cache to invoke throttle condition.
*/
public void testThrottleCondition() {
final ProjectCacheCleaner cleaner = new ProjectCacheCleaner(this.cacheDir, 0.65, 0.7);
cleaner.deleteProjectDirsIfNecessary(3000000);
assertThat(this.cacheDir.list()).hasSize(1);
as... | Deleting the least recently used item in the cache to accommodate new item. | testThrottleCondition | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/ProjectCacheCleanerTest.java | Apache-2.0 |
@Ignore
@Test
public void testFinishedBlock() {
final BlockingStatus status = new BlockingStatus(1, "test", Status.SKIPPED);
final WatchingThread thread = new WatchingThread(status);
thread.start();
try {
thread.join();
} catch (final InterruptedException e) {
e.printStackTrace();
... | TODO: Ignore this test at present since travis in Github can not always pass this test. We will
modify the below code to make travis pass in future. | testFinishedBlock | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/event/BlockingStatusTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/event/BlockingStatusTest.java | Apache-2.0 |
@Ignore
@Test
public void testUnfinishedBlock() throws InterruptedException {
final BlockingStatus status = new BlockingStatus(1, "test", Status.QUEUED);
final WatchingThread thread = new WatchingThread(status);
thread.start();
Thread.sleep(3000);
status.changeStatus(Status.SUCCEEDED);
th... | TODO: Ignore this test at present since travis in Github can not always pass this test. We will
modify the below code to make travis pass in future. | testUnfinishedBlock | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/event/BlockingStatusTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/event/BlockingStatusTest.java | Apache-2.0 |
@Ignore
@Test
public void testUnfinishedBlockSeveralChanges() throws InterruptedException {
final BlockingStatus status = new BlockingStatus(1, "test", Status.QUEUED);
final WatchingThread thread = new WatchingThread(status);
thread.start();
Thread.sleep(3000);
status.changeStatus(Status.PAUSE... | TODO: Ignore this test at present since travis in Github can not always pass this test. We will
modify the below code to make travis pass in future. | testUnfinishedBlockSeveralChanges | java | azkaban/azkaban | azkaban-exec-server/src/test/java/azkaban/execapp/event/BlockingStatusTest.java | https://github.com/azkaban/azkaban/blob/master/azkaban-exec-server/src/test/java/azkaban/execapp/event/BlockingStatusTest.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.