Skip to content

Conversation

@babyTsakhes
Copy link
Collaborator

I added flags to the greeting, wrote mock tests, fixed tests that crashed after making changes, updated the byte sequences in the map with features that are expected from the client.

Copy link
Collaborator

@oleg-jukovec oleg-jukovec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch! Please, see comments above.

Please, add an entry in the CHANGELOG.md too and squash commits into a single one:

https://www.tarantool.io/en/doc/latest/contributing/developer_guidelines/#how-to-write-a-commit-message

A prefix could be conn or iproto instead of the v3.

protocol_test.go Outdated
Comment on lines 86 to 87
iproto.IPROTO_FEATURE_IS_SYNC, // TESTING THIS
iproto.IPROTO_FEATURE_INSERT_ARROW, // TESTING THIS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
iproto.IPROTO_FEATURE_IS_SYNC, // TESTING THIS
iproto.IPROTO_FEATURE_INSERT_ARROW, // TESTING THIS
iproto.IPROTO_FEATURE_IS_SYNC,
iproto.IPROTO_FEATURE_INSERT_ARROW,

protocol_test.go Outdated
Comment on lines 90 to 91

assert.NotNil(t, req)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get the idea of the test. It just creates a request. What is tested here actually?

protocol_test.go Outdated
Comment on lines 58 to 67
// Performing the mock test
protocolInfo := mockConn.ProtocolInfo()

// Check that the features are present
assert.Contains(t, protocolInfo.Features, iproto.IPROTO_FEATURE_IS_SYNC,
"IPROTO_FEATURE_IS_SYNC should be supported")
assert.Contains(t, protocolInfo.Features, iproto.IPROTO_FEATURE_INSERT_ARROW,
"IPROTO_FEATURE_INSERT_ARROW should be supported")

mockConn.AssertCalled(t, "ProtocolInfo")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here. We create a mock that returns expectedProtocolInfo and that check that expected is expected... Am I missing something?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove the tests since they tests nothing.

go.sum Outdated
Comment on lines 18 to 19
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, revert the unnecessary changes.

go.mod Outdated
Comment on lines 12 to 26

)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
golang.org/x/mod v0.27.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/tools v0.36.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, revert the unnecessary changes.

dial_test.go Outdated
0xcf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // Version.
0x55,
0x97, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, // Features.
0x99, // fixed arr 9 elmnts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
0x99, // fixed arr 9 elmnts
0x99, // Fixed array with 9 elements.

protocol_test.go Outdated
/// Testing the global clientProtocolInfo from protocol.go
// To do this, we need to either make it exportable or test it through a public API

// Creating an IdRequest with the current clientProtocolInfo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment should end with a dot.

Suggested change
// Creating an IdRequest with the current clientProtocolInfo
// Creating an IdRequest with the current clientProtocolInfo.

protocol_test.go Outdated
Comment on lines 72 to 73
/// Testing the global clientProtocolInfo from protocol.go
// To do this, we need to either make it exportable or test it through a public API
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

etc

Suggested change
/// Testing the global clientProtocolInfo from protocol.go
// To do this, we need to either make it exportable or test it through a public API
/// Testing the global clientProtocolInfo from protocol.go
// To do this, we need to either make it exportable or test it through a public API.

@babyTsakhes babyTsakhes force-pushed the babyTsakhes/gh-466-add-missing-IPROTO-feature-flags branch from 21bafd9 to 6111b79 Compare October 28, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants