[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-30 Thread Stephan Ewen (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15306893#comment-15306893
 ] 

Stephan Ewen commented on FLINK-1827:
-

BTW: You can always skip the tests by using {{-DskipTests}} rather than 
{{-Dmaven.test.skip=true}}.
The only difference is that the second does not build the test scope at all, 
thereby causing the problems.

Why can we not go more or less back to how it was, and you use {{-DskipTests}} 
instead?

> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-30 Thread Stefano Bortoli (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15306788#comment-15306788
 ] 

Stefano Bortoli commented on FLINK-1827:


The problem is not for the tests that depend on test-utils, but the fact that 
test-utils depends on other test-jars. E.g. the runtime test-jar. So, if you 
skip tests, test-utils would not build.



> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-30 Thread Stephan Ewen (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15306783#comment-15306783
 ] 

Stephan Ewen commented on FLINK-1827:
-

I think a {{flink-test-utils}} project is very worthwhile, as part of the core 
Flink project. It would be the right place to put extended test utility classes 
into.

I don't quite understand why tests should not depend on the "main" scope of the 
{{flink-test-utils}} project. If you skip tests compilation completely, then 
{{flink-test-utils}} is still compiled, but that is not a problem.

> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-19 Thread Stefano Bortoli (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15290779#comment-15290779
 ] 

Stefano Bortoli commented on FLINK-1827:


Moving the classes from test to main does not allow to skip test because there 
are dependencies with classes in test-jar of core and runtime. The tie with the 
runtime test classes is rather extensive. Specially through the TestiUtils.

Also the flink-test component has all classes just in the test folder. Are you 
sure you want to move the classes to the main folder for the test-utils? If you 
want to make such component a utility for developers, it should become much 
more substantial than what it is now. Perhaps it would be better even as an 
external project. 

> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-18 Thread Stefano Bortoli (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15288922#comment-15288922
 ] 

Stefano Bortoli commented on FLINK-1827:


During the PR review, Till suggested to move the utilities classes into the 
flink-test component, and get rid of that. However, if you think we should keep 
it I have no problem. I will move back the classes to the main project and 
create a PR for it. 

> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-17 Thread Stephan Ewen (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15287383#comment-15287383
 ] 

Stephan Ewen commented on FLINK-1827:
-

I think we should restore the test util classes for the {{main}} scope in the 
{{flink-test-utils}} project.
The {{flink-test-utils}} project was originally created exactly to host the 
relevant test classes, so that other projects can make simple use of them, 
without the test-jar workaround.

If I understand Maven correctly, a {{test-jar}} is a fix or a project layout 
structure that it not following the proper idiomatic pattern, where every 
reusable utility collection should have its own dependency.
While there are good reasons to sometimes use test jars rather than factor the 
utils into dedicated projects (to reduce the number of projects, or at least 
make it look like that), for the definite collection of reusable test utils, we 
should not use a workaround. Like [~joshng] said, it has a couple of drawbacks, 
especially around transitive dependencies.

If the main cause for this issue was the test dependency on ScalaTest, it 
should be enough to move the {{FlinkTestBase}} classes into the test jar. Or, 
given that the ML project is the only user of that class, why not simply move 
it directly to the ML test project, and remove the ScalaTest dependency from 
{{flink-test-utils}}?

> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-16 Thread Stefano Bortoli (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15284315#comment-15284315
 ] 

Stefano Bortoli commented on FLINK-1827:


Hi Josh,

first of all, sorry for the troubles caused! FYI, we are discussing about 
merging the test-utils classes into flink-tests component and remove it. 

I understand your points, and I am happy you could work around the dependencies 
configuration. The main objective of this activity was to make the build of 
flink faster, skipping tests (-Dmaven.test.skip=true). We to did it trying to 
follow maven best practices, but if you are willing to contribute any changes, 
you are welcome to do it. 

> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-13 Thread josh gruenberg (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15283180#comment-15283180
 ] 

josh gruenberg commented on FLINK-1827:
---

Hi all,

This change just tripped up my team: we have some tests that depend on 
flink-test-utils, and we're working with 1.1-SNAPSHOT to try out the 
SessionWindows feature. Our build suddenly stopped working last week when this 
change was deployed, until rmetzger helped us get unstuck (thanks! :) by adding 
the "test-jar" type to the pom dependency.

I'll offer that I think this may not ultimately be a great technique for 
achieving your goal of streamlining your dev-builds. Here's why:

- specifying "test-jar" is error-prone boilerplate for all 
consumers of this dependency; forgetting to include this unusual requirement 
leads to confusing error-messages
- problems arise with transitive dependencies when depending on test-jars: the 
transitive dependencies do not get propagated to the consuming projects, 
requiring all consumers to add direct references to all dependencies 
themselves. This problem can snowball later if more dependencies are added to 
the test-jar. (See https://issues.apache.org/jira/browse/MNG-1378)

I don't think it's correct to assume that all "test-related" code should always 
be in src/test: the purpose of this particular artifact is just to provide 
test-utilities; that is its only reason for existing, and so that code should 
be its src/main. If there were tests FOR the test-utils, then _those_ would 
appropriately reside in src/test (and would thus correctly be omitted from the 
assembly of the released jar).

There's more on this here: 
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html

If your intent is to omit this artifact from a streamlined build, then this 
might be better approached via alternative maven configurations. There are 
probably many ways to achieve this; one possibility is via a profile in the 
flink-test-utils pom that disables its build (eg, by disabling the compiler 
plugin, as described in the second answer here: 
http://stackoverflow.com/questions/14614446/how-do-i-disable-the-maven-compiler-plugin).


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
> Fix For: 1.1.0
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15271258#comment-15271258
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/1915


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15270797#comment-15270797
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user fhueske commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-216896889
  
Merging


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15270342#comment-15270342
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user fhueske commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-216793718
  
Thanks for the update @stefanobortoli. 
PR is good to merge once tests pass.


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15268691#comment-15268691
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user zentol commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-216525073
  
@stefanobortoli yes.


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15268666#comment-15268666
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user stefanobortoli commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-216521677
  
 @tillrohrmann, I see the conflicts. How should I deal with this? rebase?


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15268410#comment-15268410
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user stefanobortoli commented on a diff in the pull request:

https://github.com/apache/flink/pull/1915#discussion_r61855824
  
--- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/util/StartupUtils.java ---
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.util;
+
+import java.util.List;
+
+public class StartupUtils {
+   
+   /**
+* A utility method to analyze the exceptions and collect the clauses
+* 
+* @param e  the root exception (Throwable) object
+* @param causes  the list of exceptions that caused the root exceptions
+* @return  a list of Throwable
+*/
+   public List getExceptionCauses(Throwable e, List 
causes) {
--- End diff --

on it


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15268408#comment-15268408
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user tillrohrmann commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-216475737
  
Modulo one more inline comment, I think it looks good.


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15268406#comment-15268406
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user tillrohrmann commented on a diff in the pull request:

https://github.com/apache/flink/pull/1915#discussion_r61855640
  
--- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/util/StartupUtils.java ---
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.runtime.util;
+
+import java.util.List;
+
+public class StartupUtils {
+   
+   /**
+* A utility method to analyze the exceptions and collect the clauses
+* 
+* @param e  the root exception (Throwable) object
+* @param causes  the list of exceptions that caused the root exceptions
+* @return  a list of Throwable
+*/
+   public List getExceptionCauses(Throwable e, List 
causes) {
--- End diff --

I think it would be slightly better if we made this method `static`. Then 
we wouldn't have to create the `StartupUtils` objects in the different test 
classes.


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-05-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15268401#comment-15268401
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user fhueske commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-216474116
  
Is this good to merge, @tillrohrmann?


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-04-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15261722#comment-15261722
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user tillrohrmann commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-215342703
  
@rmetzger said that it is related to corrupt cache files and that 
refreshing the caches would help. I think @uce already contacted INFRA to do 
that. Hopefully, this will fix the Scala problems.


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-04-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15260793#comment-15260793
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user thvasilo commented on the pull request:

https://github.com/apache/flink/pull/1915#issuecomment-215201773
  
Any idea what might be causing the error in FlinkML? I can't pinpoint it to 
any specific source file. 


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2016-04-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15257678#comment-15257678
 ] 

ASF GitHub Bot commented on FLINK-1827:
---

Github user stefanobortoli commented on a diff in the pull request:

https://github.com/apache/flink/pull/1915#discussion_r61037816
  
--- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskManagerStartupTest.java
 ---
@@ -53,41 +59,55 @@ public void testStartupWhenTaskmanagerActorPortIsUsed() 
{
blocker = new ServerSocket(0, 50, localAddress);
final int port = blocker.getLocalPort();
 
-   try {
-   TaskManager.runTaskManager(
-   localHostName,
-   ResourceID.generate(),
-   port,
-   new Configuration(),
+   TaskManager.runTaskManager(localHostName, 
ResourceID.generate(), port, new Configuration(),
TaskManager.class);
-   fail("This should fail with an IOException");
-   }
-   catch (IOException e) {
-   // expected. validate the error message
-   assertNotNull(e.getMessage());
-   assertTrue(e.getMessage().contains("Address 
already in use"));
+   fail("This should fail with an IOException");
+
+   } catch (IOException e) {
+   // expected. validate the error messagex
+   List causes = getExceptionCauses(e, new 
ArrayList());
+   for (Throwable cause : causes) {
+   if (cause instanceof BindException) {
+   throw (BindException) cause;
+   }
}
-
-   }
-   catch (Exception e) {
+   fail("This should fail with an exception caused by 
BindException");
+   } catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
-   }
-   finally {
+   } finally {
if (blocker != null) {
try {
blocker.close();
-   }
-   catch (IOException e) {
+   } catch (IOException e) {
// no need to log here
}
}
}
}
 
/**
-* Tests that the TaskManager startup fails synchronously when the I/O 
directories are
-* not writable.
+* A utility method to analyze the exceptions and collect the clauses
+* 
+* @param e
+*the root exception (Throwable) object
+* @param causes
+*the list of exceptions that caused the root exceptions
+* @return
+*/
+   private List getExceptionCauses(Throwable e, List 
causes) {
--- End diff --

sure I can do that


> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2015-10-26 Thread Flavio Pompermaier (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14975242#comment-14975242
 ] 

Flavio Pompermaier commented on FLINK-1827:
---

A lot of improvements regarding Flink tests are going on in these last 
days...any effort in solving this easy issue? Do you want me to open a PR for 
this?

> Move test classes in test folders and fix scope of test dependencies
> 
>
> Key: FLINK-1827
> URL: https://issues.apache.org/jira/browse/FLINK-1827
> Project: Flink
>  Issue Type: Improvement
>  Components: Build System
>Affects Versions: 0.9
>Reporter: Flavio Pompermaier
>Priority: Minor
>  Labels: test-compile
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Right now it is not possible to avoid compilation of test classes 
> (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
> requires test classes in non-test sources (e.g. 
> scalatest_${scala.binary.version})
> Test classes should be moved to src/main/test (if Java) and src/test/scala 
> (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2015-04-08 Thread Stephan Ewen (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14485153#comment-14485153
 ] 

Stephan Ewen commented on FLINK-1827:
-

I agree, that would be a good fix.

Is that problem only in {{flink-test-utils}}, or also in other projects?

 Move test classes in test folders and fix scope of test dependencies
 

 Key: FLINK-1827
 URL: https://issues.apache.org/jira/browse/FLINK-1827
 Project: Flink
  Issue Type: Improvement
  Components: Build System
Affects Versions: 0.9
Reporter: Flavio Pompermaier
Priority: Minor
  Labels: test-compile
   Original Estimate: 4h
  Remaining Estimate: 4h

 Right now it is not possible to avoid compilation of test classes 
 (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
 requires test classes in non-test sources (e.g. 
 scalatest_${scala.binary.version})
 Test classes should be moved to src/main/test (if Java) and src/test/scala 
 (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (FLINK-1827) Move test classes in test folders and fix scope of test dependencies

2015-04-08 Thread Flavio Pompermaier (JIRA)

[ 
https://issues.apache.org/jira/browse/FLINK-1827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14485261#comment-14485261
 ] 

Flavio Pompermaier commented on FLINK-1827:
---

I know that the problem is in flink-test-utils because it is the first project 
breaking the compilation..once fixed that you'll find other problems compiling 
flink with -Dmaven.test.skip=true

 Move test classes in test folders and fix scope of test dependencies
 

 Key: FLINK-1827
 URL: https://issues.apache.org/jira/browse/FLINK-1827
 Project: Flink
  Issue Type: Improvement
  Components: Build System
Affects Versions: 0.9
Reporter: Flavio Pompermaier
Priority: Minor
  Labels: test-compile
   Original Estimate: 4h
  Remaining Estimate: 4h

 Right now it is not possible to avoid compilation of test classes 
 (-Dmaven.test.skip=true) because some project (e.g. flink-test-utils) 
 requires test classes in non-test sources (e.g. 
 scalatest_${scala.binary.version})
 Test classes should be moved to src/main/test (if Java) and src/test/scala 
 (if scala) and use scope=test for test dependencies



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)