You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2022/12/29 21:19:18 UTC
[GitHub] [tinkerpop] Cole-Greer opened a new pull request, #1923: [TINKERPOP-2480] Adds Tests for User Agent in GLVs
Cole-Greer opened a new pull request, #1923:
URL: https://github.com/apache/tinkerpop/pull/1923
https://issues.apache.org/jira/browse/TINKERPOP-2480
This is my final PR towards TINKERPOP-2480. It simply adds a couple of simple tests in each GLV validating that the user agent is behaving correctly.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] xiazcy merged pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
xiazcy merged PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] xiazcy commented on pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
xiazcy commented on PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#issuecomment-1379392341
VOTE +1
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] Cole-Greer commented on a diff in pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
Cole-Greer commented on code in PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#discussion_r1064944292
##########
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientBehaviorIntegrationTests.cs:
##########
@@ -84,5 +84,37 @@ await gremlinClient.SubmitWithSingleResultAsync<Vertex>(RequestMessage.Build("1"
Assert.NotNull(response2);
Assert.Equal(1, gremlinClient.NrConnections);
}
+
+ [Fact]
+ public async Task ShouldIncludeUserAgentInHandshakeRequest()
+ {
+ var sessionId = Guid.NewGuid().ToString();
Review Comment:
No it's not, I have removed it.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] FlorianHockmann commented on a diff in pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
FlorianHockmann commented on code in PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#discussion_r1061581137
##########
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientBehaviorIntegrationTests.cs:
##########
@@ -84,5 +84,37 @@ await gremlinClient.SubmitWithSingleResultAsync<Vertex>(RequestMessage.Build("1"
Assert.NotNull(response2);
Assert.Equal(1, gremlinClient.NrConnections);
}
+
+ [Fact]
+ public async Task ShouldIncludeUserAgentInHandshakeRequest()
+ {
+ var sessionId = Guid.NewGuid().ToString();
Review Comment:
(nitpick) Is the `sessionId` really needed for this test?
##########
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientBehaviorIntegrationTests.cs:
##########
@@ -84,5 +84,37 @@ await gremlinClient.SubmitWithSingleResultAsync<Vertex>(RequestMessage.Build("1"
Assert.NotNull(response2);
Assert.Equal(1, gremlinClient.NrConnections);
}
+
+ [Fact]
+ public async Task ShouldIncludeUserAgentInHandshakeRequest()
+ {
+ var sessionId = Guid.NewGuid().ToString();
+ var poolSettings = new ConnectionPoolSettings {PoolSize = 1};
+
+ var gremlinServer = new GremlinServer(TestHost, Settings.Port);
+ var gremlinClient = new GremlinClient(gremlinServer, messageSerializer: Serializer,
Review Comment:
Please add a `using` here to ensure that the `gremlinClient` will be disposed at the end of this test. The same applies to the other tests in this class.
##########
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientBehaviorIntegrationTests.cs:
##########
@@ -84,5 +84,37 @@ await gremlinClient.SubmitWithSingleResultAsync<Vertex>(RequestMessage.Build("1"
Assert.NotNull(response2);
Assert.Equal(1, gremlinClient.NrConnections);
}
+
+ [Fact]
+ public async Task ShouldIncludeUserAgentInHandshakeRequest()
+ {
+ var sessionId = Guid.NewGuid().ToString();
+ var poolSettings = new ConnectionPoolSettings {PoolSize = 1};
Review Comment:
(nitpick) Wouldn't this also work with the default settings? I wouldn't specify any settings in tests if they aren't needed for the specific test case to keep the tests as simple as possible.
##########
gremlin-dotnet/src/Gremlin.Net/Process/Utils.cs:
##########
@@ -32,8 +32,11 @@ namespace Gremlin.Net.Process
/// <summary>
/// Contains useful methods that can be reused across the project.
/// </summary>
- internal static class Utils
+ public static class Utils
Review Comment:
I think we should not make such a class public only to use it in tests as it only includes methods that are intended to be used by the driver internally.
You can instead allow `Gremlin.Net.IntegrationTest` to access internals of `Gremlin.Net` if you add it [here](https://github.com/apache/tinkerpop/blob/7f7d3a485c7f100f98047b71672a0c2c9ab855b4/gremlin-dotnet/src/Gremlin.Net/Properties/AssemblyInfo.cs#L26) just like we did for `Gremlin.Net.UnitTest` already. This unfortunately requires to also sign the `Gremlin.Net.IntegrationTest` assembly which can be done by adding [these 3 lines](https://github.com/apache/tinkerpop/blob/master/gremlin-dotnet/test/Gremlin.Net.UnitTest/Gremlin.Net.UnitTest.csproj#L6-L8) to its csproj file.
(I can help you with this if you need any help.)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] Cole-Greer commented on a diff in pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
Cole-Greer commented on code in PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#discussion_r1064944969
##########
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientBehaviorIntegrationTests.cs:
##########
@@ -84,5 +84,37 @@ await gremlinClient.SubmitWithSingleResultAsync<Vertex>(RequestMessage.Build("1"
Assert.NotNull(response2);
Assert.Equal(1, gremlinClient.NrConnections);
}
+
+ [Fact]
+ public async Task ShouldIncludeUserAgentInHandshakeRequest()
+ {
+ var sessionId = Guid.NewGuid().ToString();
+ var poolSettings = new ConnectionPoolSettings {PoolSize = 1};
Review Comment:
Thanks, I have removed unnecessary settings
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] codecov-commenter commented on pull request #1923: [TINKERPOP-2480] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#issuecomment-1367596534
# [Codecov](https://codecov.io/gh/apache/tinkerpop/pull/1923?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#1923](https://codecov.io/gh/apache/tinkerpop/pull/1923?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (68865bb) into [master](https://codecov.io/gh/apache/tinkerpop/commit/c604e6426f4b0a591454798cc37b7831e76f724f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c604e64) will **decrease** coverage by `4.11%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #1923 +/- ##
============================================
- Coverage 68.56% 64.45% -4.12%
============================================
Files 856 24 -832
Lines 41202 3716 -37486
Branches 5626 0 -5626
============================================
- Hits 28251 2395 -25856
+ Misses 10969 1152 -9817
+ Partials 1982 169 -1813
```
| [Impacted Files](https://codecov.io/gh/apache/tinkerpop/pull/1923?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...in/structure/io/binary/types/LambdaSerializer.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9zdHJ1Y3R1cmUvaW8vYmluYXJ5L3R5cGVzL0xhbWJkYVNlcmlhbGl6ZXIuamF2YQ==) | | |
| [...gremlin/driver/handler/WebSocketClientHandler.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1kcml2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3RpbmtlcnBvcC9ncmVtbGluL2RyaXZlci9oYW5kbGVyL1dlYlNvY2tldENsaWVudEhhbmRsZXIuamF2YQ==) | | |
| [...ocess/traversal/step/sideEffect/SackValueStep.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9zdGVwL3NpZGVFZmZlY3QvU2Fja1ZhbHVlU3RlcC5qYXZh) | | |
| [...emlin/process/traversal/step/map/MinLocalStep.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9zdGVwL21hcC9NaW5Mb2NhbFN0ZXAuamF2YQ==) | | |
| [...op/gremlin/structure/io/graphml/GraphMLMapper.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9zdHJ1Y3R1cmUvaW8vZ3JhcGhtbC9HcmFwaE1MTWFwcGVyLmphdmE=) | | |
| [.../gryo/kryoshim/shaded/ShadedSerializerAdapter.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9zdHJ1Y3R1cmUvaW8vZ3J5by9rcnlvc2hpbS9zaGFkZWQvU2hhZGVkU2VyaWFsaXplckFkYXB0ZXIuamF2YQ==) | | |
| [...mlin/process/traversal/step/map/SelectOneStep.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9zdGVwL21hcC9TZWxlY3RPbmVTdGVwLmphdmE=) | | |
| [...p/gremlin/server/handler/WebSocketHandlerUtil.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1zZXJ2ZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3RpbmtlcnBvcC9ncmVtbGluL3NlcnZlci9oYW5kbGVyL1dlYlNvY2tldEhhbmRsZXJVdGlsLmphdmE=) | | |
| [...emlin/process/traversal/step/util/ProfileStep.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9wcm9jZXNzL3RyYXZlcnNhbC9zdGVwL3V0aWwvUHJvZmlsZVN0ZXAuamF2YQ==) | | |
| [...op/gremlin/structure/util/AbstractTransaction.java](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-Z3JlbWxpbi1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS90aW5rZXJwb3AvZ3JlbWxpbi9zdHJ1Y3R1cmUvdXRpbC9BYnN0cmFjdFRyYW5zYWN0aW9uLmphdmE=) | | |
| ... and [822 more](https://codecov.io/gh/apache/tinkerpop/pull/1923/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] Cole-Greer commented on a diff in pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
Cole-Greer commented on code in PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#discussion_r1064943944
##########
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Driver/GremlinClientBehaviorIntegrationTests.cs:
##########
@@ -84,5 +84,37 @@ await gremlinClient.SubmitWithSingleResultAsync<Vertex>(RequestMessage.Build("1"
Assert.NotNull(response2);
Assert.Equal(1, gremlinClient.NrConnections);
}
+
+ [Fact]
+ public async Task ShouldIncludeUserAgentInHandshakeRequest()
+ {
+ var sessionId = Guid.NewGuid().ToString();
+ var poolSettings = new ConnectionPoolSettings {PoolSize = 1};
+
+ var gremlinServer = new GremlinServer(TestHost, Settings.Port);
+ var gremlinClient = new GremlinClient(gremlinServer, messageSerializer: Serializer,
Review Comment:
Sure, I will add this
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] Cole-Greer commented on a diff in pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
Cole-Greer commented on code in PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#discussion_r1064947226
##########
gremlin-dotnet/src/Gremlin.Net/Process/Utils.cs:
##########
@@ -32,8 +32,11 @@ namespace Gremlin.Net.Process
/// <summary>
/// Contains useful methods that can be reused across the project.
/// </summary>
- internal static class Utils
+ public static class Utils
Review Comment:
Thanks for suggestions Florian. I have implemented this one using the same key file as is being used for `Gremlin.Net.UnitTest`. Please let me know if I should instead be generating new keys for this.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] vkagamlyk commented on pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
vkagamlyk commented on PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#issuecomment-1377579292
VOTE +1
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tinkerpop] FlorianHockmann commented on a diff in pull request #1923: [TINKERPOP-2838] Adds Tests for User Agent in GLVs
Posted by GitBox <gi...@apache.org>.
FlorianHockmann commented on code in PR #1923:
URL: https://github.com/apache/tinkerpop/pull/1923#discussion_r1065415293
##########
gremlin-dotnet/src/Gremlin.Net/Process/Utils.cs:
##########
@@ -32,8 +32,11 @@ namespace Gremlin.Net.Process
/// <summary>
/// Contains useful methods that can be reused across the project.
/// </summary>
- internal static class Utils
+ public static class Utils
Review Comment:
Using the same key file definitely makes sense. We're also already using the same file for the [source project itself](https://github.com/apache/tinkerpop/blob/master/gremlin-dotnet/src/Gremlin.Net/Gremlin.Net.csproj#L60).
--
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.
To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org