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

ASF GitHub Bot commented on TINKERPOP-2274:
-------------------------------------------

rpopov commented on pull request #1188: [TINKERPOP-2274] Fixed the issues 
revealed while compiling and runnin…
URL: https://github.com/apache/tinkerpop/pull/1188
 
 
   [TINKERPOP-2274] Fixed the issues revealed while compiling and running tests 
under Windows
   
   ## File system differences
   * Revealed that the Spark context is not closed between the tests, while the 
tests remove its storage files, therefore explicitluy store Spark Cintext for 
every test, making the tests independent and (more) corect on Spark use.
   * Revealed that Spark does not close the FileInputStreams it iterates upon, 
so that locks hang up in the file system. Thus, not being able to fix 
Spark/Hadoop and specifically the use of MultiIterator, call explicitly 
System.gc() in order to finalize the streams remaining open after closing the 
context.
   
   * In Windows the file locking is diffrent than in LINUX, so rm() tests 
failed. 
   * See: [https://issues.apache.org/jira/browse/SPARK-12216]
   
   ## Documentaton
   * Documented the convention to use only UNIX-formatted file paths as of the 
Storage API.
   * Revealed the use and documented the Storage interface. 
       
   ## File names and conventions
   * Delegated file parsing to File class for platform independence
   * Migrated to use unform UNIX-formatted paths, even under Windows for 
platform indepenence.
   * Imposed Path / File classes use instead of manually composing file names.
   * Avoided strings as Storage file system paths.
   * Resolved inconsistency of Storage (file system) API returning null.
   * Refactored FileSystemStorage to match the use & specification. 
   * Fixed possible leaking resources. 
   * Fixed inconsistencies in the use of / and home directory.
   * Changed Storage.rm() to report if it succeeded to remove at least a file 
(in scope).
   * Changed Spark tests close use the non-persistent context, this way closing 
it when not needed
   
   ## Changed tests
   * Fixed EarlyLimitStrategyTest to allow running it
   * Fixed the loger matching tests to ignore platform-specific EOLN char(s)
   * Fixed 
org.apache.tinkerpop.gremlin.hadoop.process.computer.AbstractHadoopGraphComputerTest
 to delete the temorary files first before attempting to create new ones with 
the same name. Provided better error diagnostic messages.
   * Renamed org.apache.tinkerpop.gremlin.TestHelper to CoreTestHelper to avoid 
confusing it with other TestHelper class.
   * Updated AbstractStorageCheck#AbstractStorageCheck tests to ease their 
understanding and help further improvement of error reporting. Fixed the tests 
of rm(), cp() methods.
   
   ## Fixed tests
     * org.apache.tinkerpop.gremlin.spark.SparkGremlinGryoSerializerTest
     * org.apache.tinkerpop.gremlin.spark.SparkGremlinTest
     * that used to fail with:
     * ERROR 
shouldSupportCopyMethods(org.apache.tinkerpop.gremlin.spark.structure.io.SparkContextStorageCheck)
     * java.lang.AssertionError
               at 
org.apache.tinkerpop.gremlin.spark.structure.io.SparkContextStorageCheck.shouldSupportCopyMethods(SparkContextStorageCheck.java:75)
       (NOTE: this is an example of "cryptic" error message reported on failed 
tests) 
     * Fixed reflection-based test to match their parameters at runtime.
       
   ## Dates
   * Used SimpleDateFormat with explicit US locale to parse the test data. 
   
   ## POM changes
   * Changed POM to dump the whole stack trace in case of test failure.
   * Set POM to check if HADOOP_HOME and HADOOP_GREMLIN_LIBS env. vars are set 
and warn if not, in order not to fail the build with NullPointerException.
   * In order to avoid MAVEN warnings, provided explicitly the most-recent 
version of jacoco in <pluginManagement> and removed <prerequisite>.
   
   * Made the required HADOOP_HOME and HADOOP_GREMLIN_LIBS set up optional to 
allow Travis build pass, but this basically negates the use of Maven enforcer 
at all - in case of not installed Hadoop the tests will fail with no indication 
why, instead of the script to define & test its environment clearly.
   
   ## Artifacts 
   * Added generation of the tests jar to publish the TestHelper class, that is 
used both in core and tests projects, as a preparation to avoid the collistion 
of TestHelper classes in both projects 
   * In hadoop project added Readme.md to describe how to install hadoop, spark 
and OS integration.
   
   
 
----------------------------------------------------------------
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:
[email protected]


> Test of TinkerGraph Gremlin fail on Windows and non EN locale
> -------------------------------------------------------------
>
>                 Key: TINKERPOP-2274
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2274
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: build-release
>    Affects Versions: 3.5.0
>         Environment: windows 10
> java version "1.8.0_221"
> Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
> Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
>            Reporter: Rusi Popov
>            Priority: Major
>
> When compiling the first time TiinkerPop projects under Windows with a locale 
> other than English (in this case Bulgarian), the tests of TinkerGraph Gremlin 
> fail due to:
>  * parsing test data using SimpleDateFormat in the default locale
>  * parsing UNIX-formatted path literal (with / separator) searching for the 
> system's file separator (\ for Windows).
> The tests of Gremlin Driver fail with:
> {code:java}
> ERROR 
> initializationError(org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryReaderWriterRoundTripTest)
>   Time elapsed: 0.046 s  <<< ERROR!
> java.text.ParseException: Unparseable date: "Jan 12, 1952"
>         at 
> org.apache.tinkerpop.gremlin.driver.ser.binary.GraphBinaryReaderWriterRoundTripTest.input(GraphBinaryReaderWriterRoundTripTest.java:180)
> {code}
> due to locale-specific format used.
> In order to reproduce:
>  * under Windows 10 clone the TinkerPop GIT repository
>  * git checkout aee038fe26ba399410720afb96c133602410fd6e
>  (version 3.5.0-SNAPSHOT)
>  * in *Start \ Settings \ Time and Language \ Regional format* choose 
> Bulgarian
>  * mvn clean install



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to