[ 
https://issues.apache.org/jira/browse/IGNITE-5725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16080382#comment-16080382
 ] 

Oleg Ignatenko edited comment on IGNITE-5725 at 1/9/18 6:43 PM:
----------------------------------------------------------------

* One option to consider is to establish a dedicated Maven profile for 
execution at TeamCity (per my brief check there is no such profile yet) and 
after that configure surefire plugin to skip these tests when TC profile is 
activated as described eg here: [How to Split JUnit Tests in a Continuous 
Integration 
Environment|https://semaphoreci.com/community/tutorials/how-to-split-junit-tests-in-a-continuous-integration-environment].
 It looks less desirable compared to making it just possible to normally run 
these tests at TC though, because skipping tests is less safe than letting them 
run.

* Another option (possibly preferable because it doesn't require tweaking 
Teamcity nor messing with maven profiles) is to modify involved Tracer methods 
to check 
[Desktop#isDesktopSupported|https://docs.oracle.com/javase/7/docs/api/java/awt/Desktop.html#isDesktopSupported()]
 and if it returns false delegate / fallback to respective {{showAscii}} 
methods to output to console.

-----
*Update* based on studying changes made to Tracer per IGNITE-7332 an option 
better than above two is to check desktop and browser support within test and 
adapt test expectation based on results of that check, that is: if there is no 
support then test should expect IOException while if there is a support then 
test should expect successful execution of invoked Tracer methods.


was (Author: oignatenko):
* One option to consider is to establish a dedicated Maven profile for 
execution at TeamCity (per my brief check there is no such profile yet) and 
after that configure surefire plugin to skip these tests when TC profile is 
activated as described eg here: [How to Split JUnit Tests in a Continuous 
Integration 
Environment|https://semaphoreci.com/community/tutorials/how-to-split-junit-tests-in-a-continuous-integration-environment].
 It looks less desirable compared to making it just possible to normally run 
these tests at TC though, because skipping tests is less safe than letting them 
run.

* Another option (possibly preferable because it doesn't require tweaking 
Teamcity nor messing with maven profiles) is to modify involved Tracer methods 
to check 
[Desktop#isDesktopSupported|https://docs.oracle.com/javase/7/docs/api/java/awt/Desktop.html#isDesktopSupported()]
 and if it returns false delegate / fallback to respective {{showAscii}} 
methods to output to console.

> Adapt TracerTest for TC builds.
> -------------------------------
>
>                 Key: IGNITE-5725
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5725
>             Project: Ignite
>          Issue Type: Bug
>          Components: build, ml
>            Reporter: Yury Babak
>              Labels: continuous_integration, ml, technical_debt
>
> Currently 
> [TracerTest|https://github.com/apache/ignite/blob/master/modules/ml/src/test/java/org/apache/ignite/ml/math/TracerTest.java]
>  runs browser when it invokes {{Tracer.showHtml}} but we don`t have even X11 
> on TeamCity. So we need to decide - run add possibility to run browser on TC, 
> change tests and abstain of calling 
> [Desktop.getDesktop().browse|https://docs.oracle.com/javase/7/docs/api/java/awt/Desktop.html#browse(java.net.URI)]
>  during TC build or just ignore this test for TC build.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to