diff --git a/Documentation/dev-bazel.txt b/Documentation/dev-bazel.txt index 0ecc82075c..a68c3acb51 100644 --- a/Documentation/dev-bazel.txt +++ b/Documentation/dev-bazel.txt @@ -258,8 +258,10 @@ To run a specific test group, e.g. the rest-account test group: bazel test //javatests/com/google/gerrit/acceptance/rest/account:rest_account ---- -To run the tests against NoteDb backend with write -to NoteDb, but not read from it: +The tests run with NoteDb fully enabled by default. + +To run the tests against NoteDb backend with write to NoteDb, but not read from +it: ---- bazel test --test_env=GERRIT_NOTEDB=WRITE //... @@ -277,10 +279,10 @@ Primary storage NoteDb: bazel test --test_env=GERRIT_NOTEDB=PRIMARY //... ---- -Primary storage NoteDb and ReviewDb disabled: +NoteDb entirely disabled: ---- - bazel test --test_env=GERRIT_NOTEDB=ON //... + bazel test --test_env=GERRIT_NOTEDB=OFF //... ---- To run only tests that do not use SSH: diff --git a/Documentation/dev-intellij.txt b/Documentation/dev-intellij.txt index 8bedd08ec7..5ec6ae8c20 100644 --- a/Documentation/dev-intellij.txt +++ b/Documentation/dev-intellij.txt @@ -177,9 +177,9 @@ Normally, this approach generates JUnit run configurations. When the Bazel plugin manages a project, it intercepts the creation and creates a Bazel test run configuration instead, which can be used just like the standard ones. -TIP: If you would like to execute a test in NoteDb mode, add -`--test_env=GERRIT_NOTEDB=READ_WRITE` to the *Bazel flags* of your run -configuration. +TIP: Tests run with NoteDb enabled by default. If you would like to execute a +test with NoteDb turned off, add `--test_env=GERRIT_NOTEDB=OFF` to the *Bazel +flags* of your run configuration. [[remote-debug]] === Debugging a remote Gerrit server diff --git a/java/com/google/gerrit/testing/NoteDbMode.java b/java/com/google/gerrit/testing/NoteDbMode.java index d4a7c7eec6..e46acc3bdd 100644 --- a/java/com/google/gerrit/testing/NoteDbMode.java +++ b/java/com/google/gerrit/testing/NoteDbMode.java @@ -52,7 +52,7 @@ public enum NoteDbMode { value = System.getProperty(SYS_PROP); } if (Strings.isNullOrEmpty(value)) { - return OFF; + return ON; } value = value.toUpperCase().replace("-", "_"); NoteDbMode mode = Enums.getIfPresent(NoteDbMode.class, value).orNull();