Skip to content

Conversation

@lennartbecker-d
Copy link
Owner

No description provided.

@github-actions
Copy link

github-actions bot commented Apr 7, 2025

Code coverage report is ready! 📈

@github-actions
Copy link

github-actions bot commented Apr 8, 2025

Code coverage report is ready! 📈

@github-actions
Copy link

github-actions bot commented Apr 9, 2025

Code coverage report is ready! 📈

@github-actions
Copy link

github-actions bot commented Apr 9, 2025

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

Comment on lines 54 to 66
void setMockTransportClient(
const std::shared_ptr<uprotocol::test::UTransportMock>& client) {
mockTransportClient_ = client;
}
void setMockTransportServer(
const std::shared_ptr<uprotocol::test::UTransportMock>& server) {
mockTransportClient_ = server;
}
void setClientUUri(const uprotocol::v1::UUri& uuri) { client_uuri = uuri; }
void setServerUUri(const uprotocol::v1::UUri& uuri) { server_uuri = uuri; }
void setSubcriptionUUri(const uprotocol::v1::UUri& uuri) {
subcription_uuri = uuri;
}
Copy link

Choose a reason for hiding this comment

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

Why implement all these setters?

Copy link
Owner Author

Choose a reason for hiding this comment

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

That´s a point. I was no quiet sure if the setter might be needed later. Just a matter if habit...
@lammjo shall I remove all setters from this PR?

Copy link

Choose a reason for hiding this comment

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

Yes, please :) I would favor YAGNI here.

Comment on lines +110 to +112

public:
~ConsumerTest() override = default;
Copy link

Choose a reason for hiding this comment

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

Why move the destructor down here? Did the linter complain about a protected destructor?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes! Destructor of '...' is protected and virtual (clang-tidycppcoreguidelines-virtual-class-destructor)
@lammjo is there any other way to mitigate this problem?

Copy link

Choose a reason for hiding this comment

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

Thanks for the explanation :)

auto subscribe_request_ttl = std::chrono::milliseconds(1000);
TEST_F(ConsumerTest, ConstructorTestSuccess) { // NOLINT
constexpr int REQUEST_TTL_TIME = 0x8000;
auto subcription_callback = someCallBack;
Copy link

Choose a reason for hiding this comment

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

Typo

Comment on lines 21 to 22
// namespace {
// using namespace uprotocol::datamodel::builder;
Copy link

Choose a reason for hiding this comment

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

Remove commented code.

uprotocol::v1::UUri uri;
static v1::UUri methodUri(const std::string& auth = "TestAuth",
uint16_t ue_id = 0x8000,
uint16_t ue_instance = 1, // NOLINT
Copy link

Choose a reason for hiding this comment

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

Nice hack! :D

@github-actions
Copy link

Code coverage report is ready! 📈

Copy link

@lammjo lammjo left a comment

Choose a reason for hiding this comment

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

Thanks, Lennart! Great work! After you've addressed my comments (if applicable) feel free to open a PR into up-cpp/main.


EXPECT_TRUE(invoke_future.valid());
auto is_ready = invoke_future.wait_for(0ms);
auto is_ready = invoke_future.wait_for(std::chrono::milliseconds(0));
Copy link

Choose a reason for hiding this comment

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

I suggest turning 0ms also into a constant just to be consistent with 10ms and 150ms.

TEST(UuidBuilderTest, CustomTimeAndRandomSource) {
TEST(UuidBuilderTest, CustomTimeAndRandomSource) { // NOLINT
constexpr std::time_t FIXED_TIME_T = 1623456789;
constexpr uint64_t FIXED_RANDOM_T = 0x1234567890ABCDEF;
Copy link

Choose a reason for hiding this comment

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

Suggested change
constexpr uint64_t FIXED_RANDOM_T = 0x1234567890ABCDEF;
constexpr uint64_t FIXED_RANDOM_UINT = 0x1234567890ABCDEF;

Comment on lines +37 to +38
// TODO(unknown)
TEST_F(TestFixture, SomeTestName) {} // NOLINT
Copy link

Choose a reason for hiding this comment

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

Oh noez... 🙈 This is not your job right now, but we should keep in mind to implement all missing tests at some point.

Comment on lines 127 to 128
} // namespace
} // namespace uprotocol::v1
Copy link

Choose a reason for hiding this comment

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

Mhmm, me gusta!

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

@github-actions
Copy link

Code coverage report is ready! 📈

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