You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Stephen Mallette (Jira)" <ji...@apache.org> on 2022/02/05 12:08:00 UTC

[jira] [Commented] (TINKERPOP-2683) Defective Path in Testing g.io()

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

Stephen Mallette commented on TINKERPOP-2683:
---------------------------------------------

[~phreed] i can't recall where we left this one - did this get resolved as part of other changes or is it still an open issue?

> Defective Path in Testing g.io()
> --------------------------------
>
>                 Key: TINKERPOP-2683
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2683
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: tinkergraph
>    Affects Versions: 3.5.1
>            Reporter: Fredrick Eisele
>            Priority: Major
>
> I found a small bug in the tinkergraph testing on windows 10. 
> It comes up because the grammar does not allow a '\' ...
> {code:none}
> fragment
> DoubleQuotedStringCharacters
>     :    DoubleQuotedStringCharacter+
>     ;
> fragment
> DoubleQuotedStringCharacter
>     :    ~('"' | '\\')
>     |   JoinLineEscape
>     |    EscapeSequence
>     ;
> {code}
> ```
> ...and the function which locates the g.io() file adds in a '\'.
> [TinkerGraphWorld.java|https://github.com/apache/tinkerpop/blob/53503bfa28ba1de061204fb96835dee856576bbf/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphWorld.java]
> {code:java}
>     @Override
>     public String changePathToDataFile(final String pathToFileFromGremlin) {
>          return ".." + File.separator + pathToFileFromGremlin;
>     }
> {code}
> The File.separator on linux is a valid character '/' but the problematic '\' character on Windows 10. 
> Which gets called by...
> [StepDefinition.java|https://github.com/apache/tinkerpop/blob/53503bfa28ba1de061204fb96835dee856576bbf/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/features/StepDefinition.java]
> {code:java}
>     private String tryUpdateDataFilePath(final String docString) {
>         final Matcher matcher = ioPattern.matcher(docString);
>         final String gremlin = matcher.matches() ?
>                 docString.replace(matcher.group(1), world.changePathToDataFile(matcher.group(1))) : docString;
>         return gremlin;
>     }
> {code}
> In particular this gets triggered by the [Read.feature|https://github.com/apache/tinkerpop/blob/53503bfa28ba1de061204fb96835dee856576bbf/gremlin-test/features/sideEffect/Read.feature] .



--
This message was sent by Atlassian Jira
(v8.20.1#820001)