Skip to content
Permalink
Browse files

[JENKINS-50296] Added test case

  • Loading branch information
agentgonzo committed Mar 21, 2018
1 parent f3053ef commit 44e15410fa023108c3544a6b3bd763439e3e6920
Showing with 16 additions and 0 deletions.
  1. +16 −0 core/src/test/java/hudson/model/ComputerTest.java
@@ -1,9 +1,18 @@
package hudson.model;

import hudson.FilePath;
import hudson.security.ACL;
import jenkins.model.Jenkins;
import org.acegisecurity.Authentication;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;

import java.io.File;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;

/**
* @author Kohsuke Kawaguchi
@@ -28,4 +37,11 @@ public void testRelocate() throws Exception {
dir.deleteRecursive();
}
}

@Issue("JENKINS-42556")
@Test
public void testThreadPoolForRemotingActsAsSystemUser() throws InterruptedException, ExecutionException {
Future<Authentication> job = Computer.threadPoolForRemoting.submit(Jenkins::getAuthentication);
assertThat(job.get(), is(ACL.SYSTEM));
}
}

0 comments on commit 44e1541

Please sign in to comment.
You can’t perform that action at this time.