Page MenuHomePhabricator

[services] Tests - Use lazy static instead of functions
ClosedPublic

Authored by karol on Jul 1 2022, 6:14 AM.
Tags
None
Referenced Files
F3485651: D4425.id14352.diff
Tue, Dec 17, 11:45 PM
F3485650: D4425.id14084.diff
Tue, Dec 17, 11:45 PM
Unknown Object (File)
Mon, Dec 16, 12:07 AM
Unknown Object (File)
Mon, Dec 2, 12:40 PM
Unknown Object (File)
Fri, Nov 29, 8:52 PM
Unknown Object (File)
Nov 16 2024, 2:27 AM
Unknown Object (File)
Nov 9 2024, 5:37 AM
Unknown Object (File)
Nov 5 2024, 4:32 PM

Details

Summary

Depends on D4413

Suggested in https://phab.comm.dev/D4325#124852
We can use Rust's lazy_static instead of functions to have static variables calculated in the runtime

Test Plan

services tests work as before

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added a reviewer: ashoat.
This revision is now accepted and ready to land.Jul 2 2022, 6:41 PM
services/commtest/tests/lib/tools.rs
28–29

It doesn't seem like this was formatted properly, despite coming after D4413 ("run cargo fmt") in the stack. Creating a Linear task ENG-1368 for @karol-bisztyga to resolve this