Skip to content
Permalink
Browse files
[FIXED JENKINS-25424] Register the descriptor
  • Loading branch information
olivergondza committed Dec 6, 2014
1 parent 2cb6669 commit 80407410ada90bd97ca20a42d2f3d25f5876092f
Showing 2 changed files with 11 additions and 1 deletion.
@@ -1,13 +1,14 @@
package hudson.plugins.xvnc;

import hudson.Extension;
import hudson.model.Node;
import hudson.slaves.NodeProperty;
import hudson.slaves.NodePropertyDescriptor;

import java.util.HashSet;
import java.util.Random;
import java.util.Set;

import hudson.slaves.NodePropertyDescriptor;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

@@ -83,6 +84,7 @@ private Object readResolve() {
return this;
}

@Extension
public static class DescriptorImpl extends NodePropertyDescriptor {

@Override
@@ -23,11 +23,13 @@
*/
package hudson.plugins.xvnc;

import static org.junit.Assert.assertTrue;
import hudson.Launcher;
import hudson.model.BuildListener;
import hudson.model.FreeStyleBuild;
import hudson.model.Result;
import hudson.model.AbstractBuild;
import hudson.model.Descriptor;
import hudson.model.FreeStyleProject;
import hudson.model.Hudson;
import hudson.plugins.xvnc.Xvnc.DescriptorImpl;
@@ -125,6 +127,12 @@ public void avoidNpeAfterDeserialiation() throws Exception {
j.buildAndAssertSuccess(p);
}

@Test @Bug(25424)
public void jenkins25424() {
Descriptor<?> desc = j.jenkins.getDescriptorOrDie(DisplayAllocator.Property.class);
assertTrue(desc instanceof DisplayAllocator.Property.DescriptorImpl);
}

private Xvnc fakeXvncRun(FreeStyleProject p) throws Exception {
final Xvnc xvnc = new Xvnc(false, false);
p.getBuildWrappersList().add(xvnc);

0 comments on commit 8040741

Please sign in to comment.