Page MenuHomePhabricator

[commtest] Fix flaky identity-tunnelbroker test
ClosedPublic

Authored by bartek on Jun 7 2024, 1:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 6:24 PM
Unknown Object (File)
Sat, Nov 23, 1:59 AM
Unknown Object (File)
Nov 2 2024, 5:12 AM
Unknown Object (File)
Nov 2 2024, 5:12 AM
Unknown Object (File)
Nov 2 2024, 5:11 AM
Unknown Object (File)
Nov 2 2024, 4:49 AM
Unknown Object (File)
Nov 1 2024, 1:17 PM
Unknown Object (File)
Nov 1 2024, 1:17 PM
Subscribers

Details

Summary

This test stops working when I introduced random and unique device IDs.

What was wrong:

  1. It was using register_user_device(None, None) which always created a user with the same (constant) device ID. Tunnelbroker was treating this as it was always the same device. So multiple users were treated as one recipient.
  2. When fixed this, it turns out that RefreshKeysRequest is expected to be sent twice, but recently it was fixed to be sent only once. Previous behavior was mentioned in https://phab.comm.dev/D9577?id=32347#inline-60330 It was working before only because other tests also sent refresh requests that were enqueued in Tunnelbroker for this constant device ID.
Test Plan

Commtest - before and after random device IDs

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bartek held this revision as a draft.
bartek published this revision for review.Jun 7 2024, 1:57 AM

Keyserver CI unrelated

services/commtest/tests/identity_tunnelbroker_tests.rs
76 ↗(On Diff #41089)

Not sure why we previously registered a device again.

This revision is now accepted and ready to land.Jun 10 2024, 10:11 AM