-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add AndroidLogRule to disable some sqlite-related spammy tags, and us…
…e in TtlTest PiperOrigin-RevId: 348724893
- Loading branch information
Showing
5 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package arcs.android.util.testutil | ||
|
||
import android.util.Log as AndroidLog | ||
import arcs.core.util.Log | ||
import arcs.core.util.testutil.LogRule | ||
import org.robolectric.shadows.ShadowLog | ||
|
||
/** TestRule which wrappers around [LogRule] and disable some database-related spammy tags. */ | ||
class AndroidLogRule(logLevel: Log.Level = Log.Level.Debug) : LogRule(logLevel) { | ||
init { | ||
ShadowLog.setLoggable("CursorWindowStats", AndroidLog.WARN) | ||
ShadowLog.setLoggable("SQLiteCursor", AndroidLog.WARN) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
load("//third_party/java/arcs/build_defs:build_defs.bzl", "arcs_kt_android_library") | ||
|
||
licenses(["notice"]) | ||
|
||
package(default_visibility = ["//java/arcs:allowed-packages"]) | ||
|
||
arcs_kt_android_library( | ||
name = "testutil", | ||
testonly = True, | ||
srcs = glob(["*.kt"]), | ||
manifest = "//java/arcs/android/common:AndroidManifest.xml", | ||
deps = [ | ||
"//java/arcs/core/util", | ||
"//java/arcs/core/util/testutil", | ||
"//third_party/java/robolectric:shadows", | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters