Commit Graph
350 Commits
Author SHA1 Message Date
Jesse Glick a689c472ab More pleasant way to test bitsets. 2013-03-21 18:05:51 -04:00
Jesse Glick 7f10717451 More tests of hash syntax. 2013-03-21 16:56:18 -04:00
Jesse Glick f9638163a9 fromdos 2013-03-21 16:39:32 -04:00
Jesse Glick e94152df33 Avoiding printing anything unless there is actually a failure.
Also take advantage of JUnit’s ability to show the exact spot of a mismatch between two strings.
2013-03-21 16:30:29 -04:00
Jesse Glick c454eaacf4 ohtake’s 20249e4 accidentally suppressed all but one test case. 2013-03-21 15:32:09 -04:00
Jesse Glick c49d6b5b3b Use TemporaryFolder to good effect.
Prevents us from leaving behind a temp dir with cyclic symlinks, which breaks JGit’s clean function.
That in turn can cause test builds to break:
https://jenkins.ci.cloudbees.com/job/core/job/jenkins_main_trunk/783/console
Cleaning workspace
FATAL: Could not delete file …/workspace/core/jenkins_main_trunk/core/target/hudson5309354136960541268tmp/c/symlink/c/symlink/c/symlink/…/c/foo.xml
org.eclipse.jgit.api.errors.JGitInternalException: Could not delete file …/workspace/core/jenkins_main_trunk/core/target/hudson5309354136960541268tmp/c/symlink/c/symlink/c/symlink/…/c/foo.xml
	at org.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:137)
	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.clean(JGitAPIImpl.java:305)
	at hudson.plugins.git.GitAPI.clean(GitAPI.java:248)
	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1213)
	at hudson.plugins.git.GitSCM$4.invoke(GitSCM.java:1196)
	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2236)
	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
	at hudson.remoting.Request$2.run(Request.java:326)
	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.io.IOException: Could not delete file …/workspace/core/jenkins_main_trunk/core/target/hudson5309354136960541268tmp/c/symlink/c/symlink/c/symlink/…/c/foo.xml
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:142)
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
	…
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
	at org.eclipse.jgit.util.FileUtils.delete(FileUtils.java:126)
	at org.eclipse.jgit.api.CleanCommand.call(CleanCommand.java:132)
	... 14 more
2013-03-20 11:23:01 -04:00
Jesse Glick 78b263421f [FIXED JENKINS-17271] Util.deleteFile should give a concrete reason for failure. 2013-03-19 11:05:21 -04:00
Kohsuke Kawaguchi 28bf5d8002 [FIXED JENKINS-15587]
The actual fix was in the pull request #675.
2013-03-12 22:13:26 -07:00
Kohsuke Kawaguchi 2f781863f5 Massaging the fix.
- ID_FORMATTER is time zone sensitive, so comparing against # of
  milliseconds since the epoch won't be portable.

- resolveSymlink can return a relative path.
2013-03-12 22:11:26 -07:00
Kohsuke Kawaguchi f7c9e81060 [JENKINS-16089] Revising 88feabb429
Based on comments from Jesse, revising the fix.

I'm now putting permlinks inside the builds/ directory to avoid the computing hassle involved in the split $JENKINS_HOME.

What we historically had in $JENKINS_HOME/jobs/JOB/lastSuccessfulBuild is also now subsumed by this feature. I initially attempted to create these permalinks in the buidl root directory, but turns out those symlinks aren't the same name as the ID of permalinks, so it doesn't mesh well.

And finally, a test!
2013-03-12 18:22:54 -07:00
Jesse Glick 400fa878e6 Verifying that symlink target may be absolute. 2013-03-08 18:55:49 -05:00
Jesse Glick f54a947fd4 JUnit 4 assumptions are the right way to mark a test as having been skipped. 2013-03-06 09:34:55 -05:00
Vojtech Juranek 9993468ce4 Merge branch 'revert-ampersand-encoding' of https://github.com/lvotypko/jenkins into pull683
Conflicts:
	core/src/test/java/hudson/UtilTest.java
2013-02-27 15:33:31 +01:00
Kohsuke Kawaguchi 319372b887 [FIXED JENKINS-12542] upgraded to XStream 1.4.4
There are several incompatibilities in XStream 1.4 that resulted in our
changing the core, but according to the text search on all the public
plugins, none of these changes affect the 600+ plugins we have today.

However, it is still possible that there are some parts of XStream 1.3
that plugins depend on but the core doesn't depend on --- we won't be
able to tell those problems at this point.
2013-02-25 19:20:33 -08:00
Jesse Glick b14a7a36e4 [FIXED JENKINS-16881] Introduced XStream2.toXMLUTF8. 2013-02-25 12:13:58 -05:00
Christoph Kutzinski ad64bcd612 Merge pull request #691 from fredg02/JENKINS-16630
[FIXED JENKINS-16630] Human readable file size method returns ",00" for files with byte length 0
2013-02-17 01:53:07 -08:00
Richard Mortimer 27f1fd1424 [FIXED JENKINS-16770] missing build title in /rssAll when build has no test result 2013-02-16 10:25:51 -08:00
Kohsuke Kawaguchi 6f0e221441 fixed a bug in handling of escaping/unescapin of XML names 2013-02-12 17:16:24 -08:00
Fred G 4bf431cfaf Fixed wrong camel casing and simplified dealing with locale 2013-02-07 23:20:23 +01:00
Fred G 6437fe2e78 Unit test for JENKINS-16630 2013-02-07 02:32:49 +01:00
Aleksas Pielikis 8f6a22297e Minor updates.
Code style convention related updates.
2013-02-05 12:47:16 +02:00
Jesse Glick f9da4a867e Found a log file full of IAEs from ModelObjectWithContextMenu.MenuItem due to an (unknown) action with an illegal absolute URI. 2013-02-04 18:11:12 -05:00
lvotypko 3d568123f3 Revert changes which broke backwad compatibility based on discussion in jenkins-dev list 2013-01-29 15:51:16 +01:00
Jesse Glick 40dcfcb181 [JENKINS-16368] Reverted faulty fix. 2013-01-28 14:47:03 -05:00
Aleksas Pielikis 548503c45a Update core/src/test/java/hudson/model/RunTest.java
Added testParseTimestampFromBuildDir to deal with JENKINS-15587.
2013-01-24 15:31:23 +02:00
Christoph Kutzinski 586af3c1ee Merge pull request #660 from larshvile/master
[FIXED JENKINS-16215] Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom
2013-01-20 04:26:53 -08:00
Vojtech Juranek d723d4aa07 Added bug number to the test 2013-01-15 20:43:34 +01:00
Oliver Gondža 460e508155 Use request protocol for configured Jenkins url 2013-01-15 16:25:02 +01:00
Jerome Lacoste c3144d43f8 Test failure on Mac: make sure we load resources in a platform independent way. 2013-01-10 12:43:08 +01:00
Kohsuke Kawaguchi b4a17d3b45 merged back the RC branch
Conflicts:
	changelog.html
2013-01-07 11:31:49 -08:00
Kohsuke Kawaguchi 4895eaafca [SECURITY-49] added a tool to re-key secrets
As an AdministrativeMonitor, it shows up in the manage Jenkins UI, and
allows the administrator to run a re-keying operation.
2013-01-05 09:26:10 -08:00
Kohsuke Kawaguchi a9aff088f3 [SECURITY-49] Deprecating Jenkins.getSecretKey()
We are replacing it by the ConfidentialStore class and the
ConfidentialKey class, which provides purpose-specific confidential
information that are separated from each other.

In this way, not all eggs are in one basket, and in case of a
compromise, the impact will contained.

Also replaced several insecure use of digest(secret|messsage) or
digest(message|secret) by HMAC.
2013-01-05 09:26:05 -08:00
Kohsuke Kawaguchi 72c68a22af Improved XStreamDOM by adding more methods 2013-01-04 16:13:37 -08:00
Kohsuke Kawaguchi 35e1602ed1 Improved XStreamDOM by adding more methods 2013-01-03 13:49:38 -08:00
Kohsuke Kawaguchi 2c97fe227a exposing this code to outside 2012-12-31 08:47:26 -08:00
Lars Hvile 35f7653b7b [JENKINS-16215] Avoiding unnecessary downloads in FilePath.installIfNecessaryFrom.
The updated version uses the locally cached timestamp, '.timestamp', to set the
'If-Modified-Since' header. 304 Not Modified responses are dealt with by
aborting the installation.
2012-12-28 14:43:41 +01:00
Kohsuke Kawaguchi d32f9e5113 merged back the RC branch 2012-11-18 17:59:10 -08:00
Kohsuke Kawaguchi 68e84726ab [FIXED SECURITY-45] 2012-11-17 12:02:49 -08:00
Richard Mortimer 80b7a49904 Add Iterators#wrap() to allow hiding of Iterable class implementation details 2012-11-17 11:00:41 -08:00
Jesse Glick 0552f5ad75 [JENKINS-13202] 646154f refinement: resolveSymlink is documented to return null, not throw an exception, when called on a regular file. 2012-11-16 13:41:22 -05:00
Jesse Glick f8b6af8f5f Added test for uniquifyName. 2012-11-13 16:25:15 -05:00
Jesse Glick d84eca4510 [FIXED JENKINS-15816] Run.ID_FORMATTER caches stale timezone values. 2012-11-13 10:47:16 -05:00
Jesse Glick 58484bb80c [FIXED JENKINS-15733] ArrayIndexOutOfBoundsException from Launcher due to misinterpretation of ProcStarter.envs in f5cebdc.
(Should this field be made a [LinkedHash]Map<String,String> or even EnvVars?
It is protected in a final class, so effectively package-private, thus not a b/w compat issue.)
2012-11-07 16:36:05 -05:00
Erik Lindblad f66e19c072 JENKINS-15418 take shares int account, ignore short paths 2012-10-25 17:18:07 +02:00
Jesse Glick 04b40131b7 FindBugs 2012-10-22 15:49:16 -04:00
Jesse Glick d9ba4814f9 Removing stale references to dev.java.net. 2012-10-18 10:29:14 -04:00
Jesse Glick 4872423170 [JENKINS-6516] Place stdio truncation message on its own line to make it more prominent. 2012-10-17 10:00:44 -04:00
Kohsuke Kawaguchi 82379c90d1 Moving old slave log files to their new locations
... based on Jesse's feedback to 1f83338dea
2012-10-12 09:41:06 -07:00
Richard Mortimer 761c437983 [FIXED JENKINS-15439] Jenkins build records lazy-loading failed to load some of my jobs
Ensure that SortedList clones the underlying data list.
Without this changes to a clone also change the original list.
2012-10-11 01:49:48 +01:00
Kohsuke Kawaguchi ff2d15aced [JENKINS-15439]
adding more probe.
2012-10-10 13:58:01 -07:00