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

Commit c06d0bc0 authored by Neil Fuller's avatar Neil Fuller
Browse files

Fix robolectric / mockito test

Fix robolectric / mockito test.

Make TimeResult non-final for mocking. This test probably used to work
but something probably changed with mockito, breaking the test. Maybe
related to b/266973332 / b/265320139.

Efforts to switch to inline mockmaker to enable mocking of final classes
again failed, so this commit changes the class to be non-final again to
get it passing.

Bug: 266973332
Test: atest ./src/com/android/server/location/gnss/NtpNetworkTimeHelperTest.java
Change-Id: I150d9f33c9c5c012bf580a2b831f2a1de83c209a
parent 6b5b4c41
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -129,7 +129,8 @@ public abstract class NtpTrustedTime implements TrustedTime {
     *
     * @hide
     */
    public static final class TimeResult {
    // Non-final for mocking frameworks
    public static class TimeResult {
        private final long mUnixEpochTimeMillis;
        private final long mElapsedRealtimeMillis;
        private final int mUncertaintyMillis;