Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a85abd57 authored by Presubmit Automerger Backend's avatar Presubmit Automerger Backend
Browse files

[automerge] DO NOT MERGE:Deflaky testLoggingStats_search_success 2p: 2c01a0bb

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20621276

Bug: 259157403
Change-Id: I0ab088b864d08cf7a54bd863ea384cc5052f12da
parents 0b49fc62 2c01a0bb
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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());