You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/03/02 13:43:33 UTC
[GitHub] [flink] zentol opened a new pull request #11285: [FLINK-16189][e2e]
Remove test logic from FlinkDistribution
zentol opened a new pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285
Based on #11240.
Removes all test-specific logic from the `FlinkDistribution` and moves it one layer up into the `FlinkResource`.
The `FlinkDistribution` is now a simple wrapper for interacting with an actual distribution.
This removes a few limitations; for example so far it was not possible to work against 2 separate distributions.
Additionally it reduces the number of points where we access system properties, making things a bit easier to understand.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#issuecomment-593416064
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "DELETED",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "DELETED",
"url" : "https://travis-ci.com/flink-ci/flink/builds/151370396",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"status" : "FAILURE",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5917",
"triggerID" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"triggerType" : "PUSH"
}, {
"hash" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/flink-ci/flink/builds/151723957",
"triggerID" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 22ee00c4ac414fc6546ce4bd5158a1fb745b2947 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151723957) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5917)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] azagrebin commented on a change in pull request #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
azagrebin commented on a change in pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#discussion_r387615044
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/LocalStandaloneFlinkResource.java
##########
@@ -51,16 +58,28 @@
private static final Logger LOG = LoggerFactory.getLogger(LocalStandaloneFlinkResource.class);
- private final FlinkDistribution distribution = new FlinkDistribution();
+ private final TemporaryFolder temporaryFolder = new TemporaryFolder();
+ private final Path distributionDirectory;
+ @Nullable
+ private final Path logBackupDirectory;
private final FlinkResourceSetup setup;
- LocalStandaloneFlinkResource(FlinkResourceSetup setup) {
+ private FlinkDistribution distribution;
+
+ LocalStandaloneFlinkResource(Path distributionDirectory, Optional<Path> logBackupDirectory, FlinkResourceSetup setup) {
+ this.distributionDirectory = distributionDirectory;
+ this.logBackupDirectory = logBackupDirectory.orElse(null);
this.setup = setup;
}
@Override
public void before() throws Exception {
- distribution.before();
+ temporaryFolder.create();
+ Path tmp = temporaryFolder.newFolder().toPath();
+ LOG.info("Copying distribution to {}.", tmp);
+ TestUtils.copyDirectory(distributionDirectory, tmp);
+
+ distribution = new FlinkDistribution(tmp);
Review comment:
`distribution = createFlinkDistribution();`
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] zentol commented on a change in pull request #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#discussion_r387635926
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/LocalStandaloneFlinkResourceFactory.java
##########
@@ -29,9 +33,21 @@
public final class LocalStandaloneFlinkResourceFactory implements FlinkResourceFactory {
private static final Logger LOG = LoggerFactory.getLogger(LocalStandaloneFlinkResourceFactory.class);
+ private static final ParameterProperty<Path> DISTRIBUTION_DIRECTORY = new ParameterProperty<>("distDir", Paths::get);
+ private static final ParameterProperty<Path> DISTRIBUTION_LOG_BACKUP_DIRECTORY = new ParameterProperty<>("logBackupDir", Paths::get);
+
@Override
public Optional<FlinkResource> create(FlinkResourceSetup setup) {
+ Optional<Path> distributionDirectory = DISTRIBUTION_DIRECTORY.get();
+ if (!distributionDirectory.isPresent()) {
+ LOG.warn("The distDir property was not set. You can set it when running maven via -DdistDir=<path> .");
Review comment:
yes, this isn't new.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] zentol merged pull request #11285: [FLINK-16189][e2e]
Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
zentol merged pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] azagrebin commented on a change in pull request #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
azagrebin commented on a change in pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#discussion_r387611941
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/LocalStandaloneFlinkResource.java
##########
@@ -71,12 +90,33 @@ public void before() throws Exception {
@Override
public void afterTestSuccess() {
- distribution.afterTestSuccess();
+ shutdownCluster();
+ temporaryFolder.delete();
}
@Override
public void afterTestFailure() {
- distribution.afterTestFailure();
+ if (distribution != null) {
+ shutdownCluster();
+ if (logBackupDirectory != null) {
+ final Path targetDirectory = logBackupDirectory.resolve(UUID.randomUUID().toString());
+ try {
+ distribution.copyLogsTo(targetDirectory);
+ LOG.info("Backed up logs to {}.", targetDirectory);
+ } catch (IOException e) {
+ LOG.warn("An error has occurred while backing up logs to {}.", targetDirectory, e);
+ }
+ }
Review comment:
`backupLogs();`
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] azagrebin commented on a change in pull request #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
azagrebin commented on a change in pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#discussion_r387581958
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/LocalStandaloneFlinkResource.java
##########
@@ -51,16 +58,28 @@
private static final Logger LOG = LoggerFactory.getLogger(LocalStandaloneFlinkResource.class);
- private final FlinkDistribution distribution = new FlinkDistribution();
+ private final TemporaryFolder temporaryFolder = new TemporaryFolder();
+ private final Path distributionDirectory;
+ @Nullable
+ private final Path logBackupDirectory;
private final FlinkResourceSetup setup;
- LocalStandaloneFlinkResource(FlinkResourceSetup setup) {
+ private FlinkDistribution distribution;
+
+ LocalStandaloneFlinkResource(Path distributionDirectory, Optional<Path> logBackupDirectory, FlinkResourceSetup setup) {
Review comment:
```suggestion
LocalStandaloneFlinkResource(Path distributionDirectory, @Nullable Path logBackupDirectory, FlinkResourceSetup setup) {
```
code style
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] azagrebin commented on a change in pull request #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
azagrebin commented on a change in pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#discussion_r387620565
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/LocalStandaloneFlinkResourceFactory.java
##########
@@ -29,9 +33,21 @@
public final class LocalStandaloneFlinkResourceFactory implements FlinkResourceFactory {
private static final Logger LOG = LoggerFactory.getLogger(LocalStandaloneFlinkResourceFactory.class);
+ private static final ParameterProperty<Path> DISTRIBUTION_DIRECTORY = new ParameterProperty<>("distDir", Paths::get);
+ private static final ParameterProperty<Path> DISTRIBUTION_LOG_BACKUP_DIRECTORY = new ParameterProperty<>("logBackupDir", Paths::get);
+
@Override
public Optional<FlinkResource> create(FlinkResourceSetup setup) {
+ Optional<Path> distributionDirectory = DISTRIBUTION_DIRECTORY.get();
+ if (!distributionDirectory.isPresent()) {
+ LOG.warn("The distDir property was not set. You can set it when running maven via -DdistDir=<path> .");
Review comment:
Does it mean that running e2e tests from IDE will always need to set `distDir` manually?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#issuecomment-593416064
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "FAILURE",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/flink-ci/flink/builds/151370396",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 281fa884afd6a76ece952ce5245227fec2d86bce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151370396) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#issuecomment-593416064
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "FAILURE",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/flink-ci/flink/builds/151370396",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5917",
"triggerID" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"triggerType" : "PUSH"
}, {
"hash" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"status" : "PENDING",
"url" : "https://travis-ci.com/flink-ci/flink/builds/151723957",
"triggerID" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 281fa884afd6a76ece952ce5245227fec2d86bce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151370396) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827)
* 22ee00c4ac414fc6546ce4bd5158a1fb745b2947 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151723957) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5917)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] azagrebin commented on a change in pull request #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
azagrebin commented on a change in pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#discussion_r387583842
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/LocalStandaloneFlinkResource.java
##########
@@ -51,16 +58,28 @@
private static final Logger LOG = LoggerFactory.getLogger(LocalStandaloneFlinkResource.class);
- private final FlinkDistribution distribution = new FlinkDistribution();
+ private final TemporaryFolder temporaryFolder = new TemporaryFolder();
+ private final Path distributionDirectory;
+ @Nullable
+ private final Path logBackupDirectory;
private final FlinkResourceSetup setup;
- LocalStandaloneFlinkResource(FlinkResourceSetup setup) {
+ private FlinkDistribution distribution;
+
+ LocalStandaloneFlinkResource(Path distributionDirectory, Optional<Path> logBackupDirectory, FlinkResourceSetup setup) {
+ this.distributionDirectory = distributionDirectory;
+ this.logBackupDirectory = logBackupDirectory.orElse(null);
this.setup = setup;
}
@Override
public void before() throws Exception {
Review comment:
nit for hotfix, can be `IOException`
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot commented on issue #11285: [FLINK-16189][e2e]
Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#issuecomment-593416064
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 281fa884afd6a76ece952ce5245227fec2d86bce UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#issuecomment-593416064
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "PENDING",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "PENDING",
"url" : "https://travis-ci.com/flink-ci/flink/builds/151370396",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 281fa884afd6a76ece952ce5245227fec2d86bce Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151370396) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827)
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot commented on issue #11285: [FLINK-16189][e2e]
Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#issuecomment-593410072
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.
## Automated Checks
Last check on commit 281fa884afd6a76ece952ce5245227fec2d86bce (Mon Mar 02 13:47:25 UTC 2020)
**Warnings:**
* No documentation files were touched! Remember to keep the Flink docs up to date!
<sub>Mention the bot in a comment to re-run the automated checks.</sub>
## Review Progress
* ❓ 1. The [description] looks good.
* ❓ 2. There is [consensus] that the contribution should go into to Flink.
* ❓ 3. Needs [attention] from.
* ❓ 4. The change fits into the overall [architecture].
* ❓ 5. Overall code [quality] is good.
Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
- `@flinkbot approve all` to approve all aspects
- `@flinkbot approve-until architecture` to approve everything until `architecture`
- `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
- `@flinkbot disapprove architecture` to remove an approval you gave earlier
</details>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] zentol commented on a change in pull request #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
zentol commented on a change in pull request #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#discussion_r387638127
##########
File path: flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/flink/LocalStandaloneFlinkResource.java
##########
@@ -51,16 +58,28 @@
private static final Logger LOG = LoggerFactory.getLogger(LocalStandaloneFlinkResource.class);
- private final FlinkDistribution distribution = new FlinkDistribution();
+ private final TemporaryFolder temporaryFolder = new TemporaryFolder();
+ private final Path distributionDirectory;
+ @Nullable
+ private final Path logBackupDirectory;
private final FlinkResourceSetup setup;
- LocalStandaloneFlinkResource(FlinkResourceSetup setup) {
+ private FlinkDistribution distribution;
+
+ LocalStandaloneFlinkResource(Path distributionDirectory, Optional<Path> logBackupDirectory, FlinkResourceSetup setup) {
+ this.distributionDirectory = distributionDirectory;
+ this.logBackupDirectory = logBackupDirectory.orElse(null);
this.setup = setup;
}
@Override
public void before() throws Exception {
- distribution.before();
+ temporaryFolder.create();
+ Path tmp = temporaryFolder.newFolder().toPath();
+ LOG.info("Copying distribution to {}.", tmp);
+ TestUtils.copyDirectory(distributionDirectory, tmp);
+
+ distribution = new FlinkDistribution(tmp);
Review comment:
meh, seems unnecessary. The whole method is about setting up the distribution; it seems arbitrary to move some of that into another method.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [flink] flinkbot edited a comment on issue #11285:
[FLINK-16189][e2e] Remove test logic from FlinkDistribution
Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11285: [FLINK-16189][e2e] Remove test logic from FlinkDistribution
URL: https://github.com/apache/flink/pull/11285#issuecomment-593416064
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "FAILURE",
"url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"status" : "SUCCESS",
"url" : "https://travis-ci.com/flink-ci/flink/builds/151370396",
"triggerID" : "281fa884afd6a76ece952ce5245227fec2d86bce",
"triggerType" : "PUSH"
}, {
"hash" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "22ee00c4ac414fc6546ce4bd5158a1fb745b2947",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* 281fa884afd6a76ece952ce5245227fec2d86bce Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151370396) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5827)
* 22ee00c4ac414fc6546ce4bd5158a1fb745b2947 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run travis` re-run the last Travis build
- `@flinkbot run azure` re-run the last Azure build
</details>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services