Page MenuHomePhabricator

[services] Tunnelbroker - Fix message `from` and `to` swap in AMQP tests
ClosedPublic

Authored by max on Aug 4 2022, 11:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 12:49 PM
Unknown Object (File)
Nov 23 2024, 12:47 AM
Unknown Object (File)
Nov 8 2024, 2:16 AM
Unknown Object (File)
Oct 28 2024, 2:06 PM
Unknown Object (File)
Oct 27 2024, 6:16 AM
Unknown Object (File)
Oct 27 2024, 6:16 AM
Unknown Object (File)
Oct 27 2024, 6:16 AM
Unknown Object (File)
Oct 27 2024, 6:12 AM

Details

Summary

This diff is a fix.

The constructor for the MessageItem entity was changed (fromDeviceID and `toDeviceID was swapped in places), but the tests have not reflected these changes. This diff fixes tests for the message items to reflect these changes.

Related Linear task: ENG-1491

Test Plan

Tests in DatabaseManagerTest.cpp was successfully built and passed in a sandbox.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

max held this revision as a draft.
max published this revision for review.Aug 4 2022, 12:33 PM
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
max added reviewers: karol, tomek.
max edited the summary of this revision. (Show Details)
max edited the test plan for this revision. (Show Details)
tomek added inline comments.
services/tunnelbroker/test/AmqpManagerTest.cpp
38–39 ↗(On Diff #15331)

Is there a way to avoid this confusion in the future? I guess we could use https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated_initializers but that requires C++20. We can also consider using a builder pattern, where every property needs to be set by using a method with meaningful name.

This revision is now accepted and ready to land.Aug 5 2022, 5:35 AM
max added inline comments.
services/tunnelbroker/test/AmqpManagerTest.cpp
38–39 ↗(On Diff #15331)

Is there a way to avoid this confusion in the future? I guess we could use https://en.cppreference.com/w/cpp/language/aggregate_initialization#Designated_initializers but that requires C++20.

I think there is some problem with switching to C++20 related to React Native ?

Is there a way to avoid this confusion in the future?

Running unit tests in CI will solve such sort of problems because it will just fail.

I think there is some problem with switching to C++20 related to React Native ?

Yeah. @varun is looking into this right now... @varun, can you document your attempts / progress in a Linear task, so other people have context?