New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "No connection on bootup" option #168
Changes from 2 commits
7bc9653
94c72b9
a1c7644
e93ca93
63b3868
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Check if this server connects to Gerrit on bootup. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't it the other way around? Ex: "Check if this server should not connect to Gerrit on bootup." There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I missed. will update. |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -316,23 +316,14 @@ private void addNewServerByCopyingConfig(String newServerName, String fromServer | |
} | ||
|
||
/** | ||
* Test triggering job with events from a Gerrit server with Pseudo mode. | ||
* Test not conect to Gerrit on startup. | ||
* @throws Exception Error creating job. | ||
*/ | ||
@Test | ||
public void testTriggeringFromGerritServersWithPseudoMode() throws Exception { | ||
public void testConnectOnStartup() throws Exception { | ||
GerritServer gerritServerOne = new GerritServer(gerritServerOneName, true); | ||
PluginImpl.getInstance().addServer(gerritServerOne); | ||
gerritServerOne.start(); | ||
FreeStyleProject projectOne = DuplicatesUtil.createGerritTriggeredJob(this, projectOneName, gerritServerOneName); | ||
PluginImpl.getInstance().getHandler().post(Setup.createPatchsetCreated(gerritServerOneName)); | ||
RunList<FreeStyleBuild> buildsOne = DuplicatesUtil.waitForBuilds(projectOne, 1, timeToBuild); | ||
|
||
FreeStyleBuild buildOne = buildsOne.get(0); | ||
assertSame(Result.SUCCESS, buildOne.getResult()); | ||
assertEquals(1, projectOne.getBuilds().size()); | ||
assertSame(gerritServerOneName, buildOne.getCause(GerritCause.class).getEvent().getProvider().getName()); | ||
assertEquals(true, gerritServerOne.isNoConnectionOnBootup()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you somehow also check that it actually hasn't tried to connect? |
||
} | ||
|
||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pseudoMode should also be made transient
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When added transient, assertion error happened in deserialize phase. But it seems there was something wrong in my environment. Now works fine.
OK, I will add it.