Merge branch 'stable-2.12'

* stable-2.12:
  ChangeIT: Assert that submitting a change doesn't remove non-voting reviewers
  Instead of deleting patch-set-approval set vote to zero
  ChangeIT#commitFooters: Fix setup of test labels
  CreateChangeIT: Fix flaky test
  Add a testing method to set the clock step used by TimeUtil
  Update issue tracker URL in documentation
  Update issue tracker URL in POM files

Change-Id: I991be7faf90cd37a8d664a0c951fea4c14f94492
This commit is contained in:
David Pursehouse 2016-06-27 10:12:08 +09:00
commit d633834772
14 changed files with 24 additions and 74 deletions

View File

@ -186,7 +186,7 @@ Gerrit is developed as a self-hosting open source project:
* link:https://www.gerritcodereview.com/[Project Homepage] * link:https://www.gerritcodereview.com/[Project Homepage]
* link:https://www.gerritcodereview.com/download/index.html[Release Versions] * link:https://www.gerritcodereview.com/download/index.html[Release Versions]
* link:https://gerrit.googlesource.com/gerrit[Source] * link:https://gerrit.googlesource.com/gerrit[Source]
* link:http://code.google.com/p/gerrit/issues/list[Issue Tracking] * link:https://bugs.chromium.org/p/gerrit/issues/list[Issue Tracking]
* link:https://review.source.android.com/[Change Review] * link:https://review.source.android.com/[Change Review]

View File

@ -10,7 +10,7 @@ Every change is expected to have an unique Change-Id.
Since this error should never occur in practice, you should inform Since this error should never occur in practice, you should inform
your Gerrit administrator if you hit this problem and/or your Gerrit administrator if you hit this problem and/or
link:http://code.google.com/p/gerrit/issues/list[open a Gerrit issue]. link:https://bugs.chromium.org/p/gerrit/issues/list[open a Gerrit issue].
In any case to not be blocked with your work, you can simply create a In any case to not be blocked with your work, you can simply create a
new Change-Id for your commit and then push it as new change to new Change-Id for your commit and then push it as new change to

View File

@ -81,7 +81,7 @@
* link:licenses.html[Licenses and Notices] * link:licenses.html[Licenses and Notices]
* link:https://www.gerritcodereview.com/[Homepage] * link:https://www.gerritcodereview.com/[Homepage]
* link:https://www.gerritcodereview.com/download/index.html[Downloads] * link:https://www.gerritcodereview.com/download/index.html[Downloads]
* link:http://code.google.com/p/gerrit/issues/list[Issue Tracking] * link:https://bugs.chromium.org/p/gerrit/issues/list[Issue Tracking]
* link:https://gerrit.googlesource.com/gerrit[Source Code] * link:https://gerrit.googlesource.com/gerrit[Source Code]
* link:https://www.gerritcodereview.com/about.md[A History of Gerrit Code Review] * link:https://www.gerritcodereview.com/about.md[A History of Gerrit Code Review]

View File

@ -25,7 +25,7 @@ There is a mirror of the repository on [Github](https://github.com/gerrit-review
## Reporting bugs ## Reporting bugs
Please report bugs on the [issue tracker](https://code.google.com/p/gerrit/issues/list). Please report bugs on the [issue tracker](https://bugs.chromium.org/p/gerrit/issues/list).
## Contribute ## Contribute

View File

@ -62,7 +62,7 @@
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>

View File

@ -1099,15 +1099,15 @@ public class ChangeIT extends AbstractDaemonTest {
@Test @Test
public void commitFooters() throws Exception { public void commitFooters() throws Exception {
LabelType verified = category("Verified", LabelType verified = category("Verified",
value(1, "Failed"), value(0, "No score"), value(-1, "Passes")); value(1, "Passes"), value(0, "No score"), value(-1, "Failed"));
LabelType custom1 = category("Custom1", LabelType custom1 = category("Custom1",
value(1, "Positive"), value(0, "No score"), value(-1, "Negative")); value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
LabelType custom2 = category("Custom2", LabelType custom2 = category("Custom2",
value(1, "Positive"), value(0, "No score"), value(-1, "Negative")); value(1, "Positive"), value(0, "No score"), value(-1, "Negative"));
ProjectConfig cfg = projectCache.checkedGet(project).getConfig(); ProjectConfig cfg = projectCache.checkedGet(project).getConfig();
cfg.getLabelSections().put(verified.getName(), verified); cfg.getLabelSections().put(verified.getName(), verified);
cfg.getLabelSections().put(custom1.getName(), verified); cfg.getLabelSections().put(custom1.getName(), custom1);
cfg.getLabelSections().put(custom2.getName(), verified); cfg.getLabelSections().put(custom2.getName(), custom2);
String heads = "refs/heads/*"; String heads = "refs/heads/*";
AccountGroup.UUID anon = AccountGroup.UUID anon =
SystemGroupBackend.getGroup(ANONYMOUS_USERS).getUUID(); SystemGroupBackend.getGroup(ANONYMOUS_USERS).getUUID();

View File

@ -62,7 +62,7 @@
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>

View File

@ -62,7 +62,7 @@
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>

View File

@ -102,7 +102,7 @@ limitations under the License.
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>

View File

@ -102,7 +102,7 @@ limitations under the License.
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>

View File

@ -62,7 +62,7 @@
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>

View File

@ -102,7 +102,7 @@ limitations under the License.
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>

View File

@ -17,10 +17,6 @@ package com.google.gerrit.testutil;
import static com.google.common.base.Preconditions.checkState; import static com.google.common.base.Preconditions.checkState;
import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.MILLISECONDS;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.SystemReader;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.DateTimeUtils; import org.joda.time.DateTimeUtils;
import org.joda.time.DateTimeUtils.MillisProvider; import org.joda.time.DateTimeUtils.MillisProvider;
@ -67,57 +63,11 @@ public class TestTimeUtil {
return clockMs.getAndAdd(clockStepMs); return clockMs.getAndAdd(clockStepMs);
} }
}); });
SystemReader.setInstance(null);
final SystemReader defaultReader = SystemReader.getInstance();
SystemReader r = new SystemReader() {
@Override
public String getHostname() {
return defaultReader.getHostname();
}
@Override
public String getenv(String variable) {
return defaultReader.getenv(variable);
}
@Override
public String getProperty(String key) {
return defaultReader.getProperty(key);
}
@Override
public FileBasedConfig openUserConfig(Config parent, FS fs) {
return defaultReader.openUserConfig(parent, fs);
}
@Override
public FileBasedConfig openSystemConfig(Config parent, FS fs) {
return defaultReader.openSystemConfig(parent, fs);
}
@Override
public long getCurrentTime() {
return clockMs.getAndAdd(clockStepMs);
}
@Override
public int getTimezone(long when) {
return defaultReader.getTimezone(when);
}
};
SystemReader.setInstance(r);
} }
/** /** Reset the clock to use the actual system clock. */
* Reset the clock to use the actual system clock.
* <p>
* As a side effect, resets the {@link SystemReader} to the original default
* instance.
*/
public static synchronized void useSystemTime() { public static synchronized void useSystemTime() {
DateTimeUtils.setCurrentMillisSystem(); DateTimeUtils.setCurrentMillisSystem();
SystemReader.setInstance(null);
} }
private TestTimeUtil() { private TestTimeUtil() {

View File

@ -62,7 +62,7 @@
</mailingLists> </mailingLists>
<issueManagement> <issueManagement>
<url>http://code.google.com/p/gerrit/issues/list</url> <url>https://bugs.chromium.org/p/gerrit/issues/list</url>
<system>Google Code Issue Tracker</system> <system>Gerrit Issue Tracker</system>
</issueManagement> </issueManagement>
</project> </project>