diff options
| author | 2022-12-13 04:37:33 +0000 | |
|---|---|---|
| committer | 2022-12-13 04:37:33 +0000 | |
| commit | ba36fd90e3b4238e378dbc1e7c21364ad06304d6 (patch) | |
| tree | 51f86b37476f97457106d6e454eaee8fbb31a49a | |
| parent | f684abcd1898d291a0cea4848274262b890d573c (diff) | |
| parent | a85abd5775c4fce8a293c262744b813bc0b4d1dd (diff) | |
Merge changes from topic "presubmit-am-8134571e02a14812820dc4626241cf6f" into sc-qpr1-dev
* changes:
[automerge] DO NOT MERGE:Deflaky testLoggingStats_search_success 2p: 2c01a0bb7e
DO NOT MERGE:Deflaky testLoggingStats_search_success
| -rw-r--r-- | services/tests/servicestests/src/com/android/server/appsearch/external/localstorage/AppSearchLoggerTest.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/services/tests/servicestests/src/com/android/server/appsearch/external/localstorage/AppSearchLoggerTest.java b/services/tests/servicestests/src/com/android/server/appsearch/external/localstorage/AppSearchLoggerTest.java index 7c976876a731..28fb1c55cc77 100644 --- a/services/tests/servicestests/src/com/android/server/appsearch/external/localstorage/AppSearchLoggerTest.java +++ b/services/tests/servicestests/src/com/android/server/appsearch/external/localstorage/AppSearchLoggerTest.java @@ -351,11 +351,12 @@ public class AppSearchLoggerTest { InitializeStats iStats = initStatsBuilder.build(); assertThat(iStats).isNotNull(); + // If the process goes really fast, the total latency could be 0. Since the default of total + // latency is also 0, we just remove the assert about NativeLatencyMillis. assertThat(iStats.getStatusCode()).isEqualTo(AppSearchResult.RESULT_OK); // Total latency captured in LocalStorage assertThat(iStats.getTotalLatencyMillis()).isEqualTo(0); assertThat(iStats.hasDeSync()).isFalse(); - assertThat(iStats.getNativeLatencyMillis()).isGreaterThan(0); assertThat(iStats.getDocumentStoreDataStatus()) .isEqualTo(InitializeStatsProto.DocumentStoreDataStatus.NO_DATA_LOSS_VALUE); assertThat(iStats.getDocumentCount()).isEqualTo(0); @@ -401,11 +402,12 @@ public class AppSearchLoggerTest { InitializeStats iStats = initStatsBuilder.build(); assertThat(iStats).isNotNull(); + // If the process goes really fast, the total latency could be 0. Since the default of total + // latency is also 0, we just remove the assert about NativeLatencyMillis. assertThat(iStats.getStatusCode()).isEqualTo(AppSearchResult.RESULT_OK); // Total latency captured in LocalStorage assertThat(iStats.getTotalLatencyMillis()).isEqualTo(0); assertThat(iStats.hasDeSync()).isFalse(); - assertThat(iStats.getNativeLatencyMillis()).isGreaterThan(0); assertThat(iStats.getDocumentStoreDataStatus()) .isEqualTo(InitializeStatsProto.DocumentStoreDataStatus.NO_DATA_LOSS_VALUE); assertThat(iStats.getDocumentCount()).isEqualTo(2); @@ -628,10 +630,11 @@ public class AppSearchLoggerTest { SearchStats sStats = mLogger.mSearchStats; assertThat(sStats).isNotNull(); + // If the process goes really fast, the total latency could be 0. Since the default of total + // latency is also 0, we just remove the assert about NativeLatencyMillis. assertThat(sStats.getPackageName()).isEqualTo(testPackageName); assertThat(sStats.getDatabase()).isEqualTo(testDatabase); assertThat(sStats.getStatusCode()).isEqualTo(AppSearchResult.RESULT_OK); - assertThat(sStats.getTotalLatencyMillis()).isGreaterThan(0); assertThat(sStats.getVisibilityScope()).isEqualTo(SearchStats.VISIBILITY_SCOPE_LOCAL); assertThat(sStats.getTermCount()).isEqualTo(2); assertThat(sStats.getQueryLength()).isEqualTo(queryStr.length()); |