[
https://issues.apache.org/jira/browse/TINKERPOP-1972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16636983#comment-16636983
]
Florian Hockmann commented on TINKERPOP-1972:
---------------------------------------------
I just debugged the scenario
{{g_injectX1X_chooseXisX1X__constantX10Xfold__foldX}} and the problem seems to
be that the {{inject}} step gets an array of integers with the member {{1}}
which isn't equal to the first argument of {{choose}} which is just the integer
{{1}}. The full Bytecode sent to the server looks like this:
{code}
{
"step": [
[
"inject",
[
{
"@type": "g:Int32",
"@value": 1
}
]
],
[
"choose",
{
"@type": "g:Bytecode",
"@value": {
"step": [
[
"is",
{
"@type": "g:Int32",
"@value": 1
}
]
]
}
},
{
"@type": "g:Bytecode",
"@value": {
"step": [
[
"constant",
{
"@type": "g:Int32",
"@value": 10
}
],
[
"fold"
]
]
}
},
{
"@type": "g:Bytecode",
"@value": {
"step": [
[
"fold"
]
]
}
}
]
]
}
{code}
and the server returns {{10}} in this case. After removing {{[]}} around the
{{g:Int32}} of {{inject}}, the server successfully returned {{1}}.
It looks like this is a general problem with steps that take a {{params S[]}}
like {{Inject}} but I don't know yet how we can fix this.
BTW, debugging .NET tests is really inconvenient right now as a test server has
to be started manually as Maven usually does that. I think something like
[Testcontainers|https://www.testcontainers.org/] could really improve this
situation, but that's another topic.
> inject() tests are throwing exceptions in .NET GLV tests
> --------------------------------------------------------
>
> Key: TINKERPOP-1972
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1972
> Project: TinkerPop
> Issue Type: Bug
> Components: dotnet
> Affects Versions: 3.2.9
> Reporter: stephen mallette
> Assignee: stephen mallette
> Priority: Minor
>
> New GLV tests were added in TINKERPOP-1963 and are generating this error:
> {code}
> Failures:
> 1) g_injectX1X_chooseXisX1X__constantX10Xfold__foldX: Failed
> System.NotSupportedException: Type is not supported.
> at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32*
> pLengths, Int32* pLowerBounds)
> at System.Array.CreateInstance(Type elementType, Int32 length)
> at
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.BuildParameters(MethodInfo
> method, Token token, IDictionary`2& genericParameterTypes) in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
> 268
> at
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversalFromTokens(IList`1
> tokens, GraphTraversalSource g, IDictionary`2 contextParameterValues, String
> traversalText) in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
> 90
> at
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversal(String
> traversalText, GraphTraversalSource g, IDictionary`2 contextParameterValues)
> in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
> 62
> at
> Gremlin.Net.IntegrationTest.Gherkin.CommonSteps.TranslateTraversal(String
> traversalText) in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs:line
> 101
> 2) g_injectX2X_chooseXisX1X__constantX10Xfold__foldX: Failed
> System.NotSupportedException: Type is not supported.
> at System.Array.InternalCreate(Void* elementType, Int32 rank, Int32*
> pLengths, Int32* pLowerBounds)
> at System.Array.CreateInstance(Type elementType, Int32 length)
> at
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.BuildParameters(MethodInfo
> method, Token token, IDictionary`2& genericParameterTypes) in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
> 268
> at
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversalFromTokens(IList`1
> tokens, GraphTraversalSource g, IDictionary`2 contextParameterValues, String
> traversalText) in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
> 90
> at
> Gremlin.Net.IntegrationTest.Gherkin.TraversalEvaluation.TraversalParser.GetTraversal(String
> traversalText, GraphTraversalSource g, IDictionary`2 contextParameterValues)
> in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/TraversalEvaluation/TraversalParser.cs:line
> 62
> at
> Gremlin.Net.IntegrationTest.Gherkin.CommonSteps.TranslateTraversal(String
> traversalText) in
> /home/smallette/git/apache/incubator-tinkerpop/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/CommonSteps.cs:line
> 101
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)