GerritServer: Skip @UseLocalDisk tests with FUSED

This is not yet supported, so tests would fail if they attempt to run
fused BatchUpdates. A quirk in the way NotesMigration is currently
populated is the only reason these are not failing now, but this will
change shortly.

In not too much longer, these checks will go away, since fused updates
will soon be supported in JGit.

Change-Id: I0676599b62078afc9e1c2c9c7dd5b82096ad1679
This commit is contained in:
Dave Borowitz
2017-07-12 14:28:11 -04:00
parent 28c8a1d4a3
commit c5f01f829a

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.acceptance;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.truth.TruthJUnit.assume;
import com.google.auto.value.AutoValue;
import com.google.common.base.MoreObjects;
@@ -189,6 +190,10 @@ public class GerritServer implements AutoCloseable {
*/
public static void init(Description desc, Config baseConfig, Path site) throws Exception {
checkArgument(!desc.memory(), "can't initialize site path for in-memory test: %s", desc);
assume()
.withMessage("FUSED mode not yet supported for on-disk sites")
.that(NoteDbMode.get())
.isNotEqualTo(NoteDbMode.FUSED);
Config cfg = desc.buildConfig(baseConfig);
Map<String, Config> pluginConfigs = desc.buildPluginConfigs();
Init init = new Init();