[DocsUI, Search]: Fix testBuildQueryArgs_hasWeekAgoTime
The test was flaky (b/156759046) and the fix tried to solve it by creating before and after timestamps and hope that the actual value is equal to one of those. However, there is still no guarantee that this will happen. This fix compares the actual value with the computed value to within 1 minute (60 * 1000 milliseconds) precision. This is sufficient when dealing with timestamps that are used to retrieve files that are up to 1 week (or 604800s) old. The flakiness of the test was amplified by the missing method error, which was fixed on ag/34111796. Bug: 425958961 Test: atest DocumentsUIGoogleTests:com.android.documentsui.queries.SearchViewManagerTest Flag: com.android.documentsui.flags.use_material3 Change-Id: I6e83c308809059a066c6163882a635c6b2e6199b
Loading
Please register or sign in to comment