You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/05/01 14:34:23 UTC

[GitHub] [skywalking] saravanan-kandaswamy opened a new pull request #2570: Fixed the EnvUtilTest to be compatible with Windows OS and OpenJDK

saravanan-kandaswamy opened a new pull request #2570: Fixed the EnvUtilTest to be compatible with Windows OS and OpenJDK
URL: https://github.com/apache/skywalking/pull/2570
 
 
   Please answer these questions before submitting your issue.
   
   - Why do you submit this issue?
   -  Bug
   The Unit test EnvUtilTest.java case in apm-datacarrier module is not passing in Windows OS 10. 
   
   ___
   ### Question
   - What do you want to know?
   Can we build the code in Windows Machine?
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
   Skywalking - Latest Code base as of Master
   OS - Windows 10
   JRE - tried with Open JDK from Redhat and from Oracle JDK 8
   Open JDK:
   openjdk version "1.8.0_201-2-redhat"
   OpenJDK Runtime Environment (build 1.8.0_201-2-redhat-b09)
   
   Oracle JDK
   java version "1.8.0_211"
   Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
   
   - Which company or project?
   I am trying the build source code in local system to write more unit tests, however the build is failing before that. 
   - What happen?
   when I try to build apm-datacarrier the build fails with the following error
   
   [INFO] Running org.apache.skywalking.apm.commons.datacarrier.EnvUtilTest
   [ERROR] Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.013 s <<< FAILURE! - in org.apache.skywalking.apm.commons.datacarrier.EnvUtilTest
   [ERROR] getInt(org.apache.skywalking.apm.commons.datacarrier.EnvUtilTest)  Time elapsed: 0.002 s  <<< FAILURE!
   java.lang.AssertionError: expected:<123> but was:<234>
           at org.apache.skywalking.apm.commons.datacarrier.EnvUtilTest.getInt(EnvUtilTest.java:56)
   
   [ERROR] getLong(org.apache.skywalking.apm.commons.datacarrier.EnvUtilTest)  Time elapsed: 0 s  <<< FAILURE!
   java.lang.AssertionError: expected:<12345678901234567> but was:<123>
           at org.apache.skywalking.apm.commons.datacarrier.EnvUtilTest.getLong(EnvUtilTest.java:62)
   
   [INFO] Running org.apache.skywalking.apm.commons.datacarrier.partition.ProducerThreadPartitionerTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s - in org.apache.skywalking.apm.commons.datacarrier.partition.ProducerThreadPartitionerTest
   [INFO] Running org.apache.skywalking.apm.commons.datacarrier.partition.SimpleRollingPartitionerTest
   [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s - in org.apache.skywalking.apm.commons.datacarrier.partition.SimpleRollingPartitionerTest
   [INFO]
   [INFO] Results:
   [INFO]
   [ERROR] Failures:
   [ERROR]   EnvUtilTest.getInt:56 expected:<123> but was:<234>
   [ERROR]   EnvUtilTest.getLong:62 expected:<12345678901234567> but was:<123>
   [INFO]
   [ERROR] Tests run: 17, Failures: 2, Errors: 0, Skipped: 0 
   
   ___
   ### Requirement or improvement
   After little bit of search I found that the code doesn't work on Windows to make it work we need to follow the steps as mentioned in link:
   https://stackoverflow.com/a/38073822
   
   I have created the pull request with the necessary change.
   Kindly review the same and let me know the results. 
   
   Thanks and Regards,
   Saravanan Kandaswamy

----------------------------------------------------------------
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