Commit Graph
1583 Commits
Author SHA1 Message Date
Jesse Glick 16197ea502 [FIXED JENKINS-23263] JUnit reporter moved to a plugin. 2014-08-11 13:45:23 -04:00
tfennelly 51af70f216 [FIXED JENKINS-24175] Some functional tests for the icon tag 2014-08-11 12:16:33 +01:00
Jesse Glick 11ab9be6ef [FIXED JENKINS-23027] Added Launcher.ProcStarter.quiet option. 2014-08-08 14:29:40 -04:00
Jesse Glick d0340b2597 f43a450c31 addendum: during migration, if nothing else is being fingerprinted besides archived artifacts, then there is no reason to keep the separate fingerprint publisher at all. 2014-08-08 14:27:38 -04:00
Jesse Glick 2323855f33 Simplifying test to use JenkinsRule.assertLogContains. 2014-08-08 12:51:59 -04:00
Jesse Glick 80da8f2958 Only helpful to dump threads in case of a timeout.
For regular test failures this is normally just annoying noise.
2014-08-05 15:18:19 -04:00
tfennelly 7cdb85d09c Modernized projectview and plugin manager (bigtables with tabs) [JENKINS-24030] 2014-08-05 12:21:18 +01:00
Jesse Glick 137c90cc61 [FIXED JENKINS-24080] Improved security of CommandDuringBuild and its current implementations. 2014-08-01 11:06:46 -04:00
Jesse Glick 7bbf36b7f0 Skip a test if starting Jenkins was interrupted.
For reasons TBD, sometimes CI tests fail with (1.565.x):
java.lang.InterruptedException: null
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:503)
	at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:267)
	at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
	at jenkins.model.Jenkins.executeReactor(Jenkins.java:915)
	at jenkins.model.Jenkins.<init>(Jenkins.java:814)
	at hudson.model.Hudson.<init>(Hudson.java:82)
	at org.jvnet.hudson.test.JenkinsRule.newHudson(JenkinsRule.java:539)
	at org.jvnet.hudson.test.JenkinsRule.before(JenkinsRule.java:331)
	at org.jvnet.hudson.test.JenkinsRule$2.evaluate(JenkinsRule.java:479)
2014-07-31 11:00:28 -04:00
Kohsuke Kawaguchi b2a98f6bc6 Create a single point in which the basic authentication header is processed.
Previously, basic auth header was processed from two different servlet
filters in a single filter chain.

In case the 1st filter (ApiTokenFilter) manages to authenticate the
request, the 2nd filter (BasicProcessingFilter) tries to avoid
interpreting the API token as the password and failing authentication
(see BasicProcessingFilter.authenticationIsRequired), but the check
feels rather fragile.

Although I did eventually discover that the original problem (ZD-19640)
was not caused by this, I've already implemented & tested this change,
and this feels like a good work to be wasted, so I'm pushing this in
anyway.

Refrence: ZD-19640
2014-07-29 16:33:57 -07:00
Oliver Gondža 8caf00bf21 Merge pull request #1323 from olivergondza/JENKINS-23893
[FIXED JENKINS-23893] Top level ListView is not updated when job is renamed/deleted
2014-07-23 20:10:11 +02:00
Jesse Glick b25e8e54dc Introduced Run.StatusSummarizer extension point so that Run need not refer directly to AbstractTestResultAction. 2014-07-22 17:47:35 -04:00
Jesse Glick 0f3574bbc1 Merge branch 'JENKINS-22641' of github.com:christ66/jenkins 2014-07-22 13:18:41 -04:00
Jesse Glick f4f28ff927 Deprecating AbstractBuild.getTestResultAction. 2014-07-22 11:58:36 -04:00
christ66 0826f09f99 Use assertLogNotContains to verify that logs do not contain sleep process. 2014-07-21 14:48:20 -07:00
Jesse Glick f03e67a49b Merge branch 'JENKINS-22641' of github.com:christ66/jenkins 2014-07-21 17:35:29 -04:00
Jesse Glick f43a450c31 Replaced Fingerprinter.recordBuildArtifacts with ArtifactArchiver.fingerprint.
This is simpler: we do not need to inspect the configuration of the project.
2014-07-21 16:58:10 -04:00
christ66 0d4c0cb6b2 Add test unit for JENKINS-22641 2014-07-21 13:16:26 -07:00
Jesse Glick f6b43d08af Removing ArtifactArchiver.latestOnly; LogRotator.artifactNumToKeep handles this more generally. 2014-07-21 15:41:27 -04:00
Oliver Gondža d74520fd4e [FIXED JENKINS-23893] Top level ListView is not updated when job is renamed/deleted 2014-07-20 22:41:43 +02:00
Jesse Glick 17d9093165 [FIXED JENKINS-17667] Fixed race condition when running tool installers on many slaves at once.
Correcting change made in #1176, which introduced an NPE, to restore original logic merely wrapped in a synchronized block.
Reproduced NPE in new functional test (original bug probably very hard to reproduce).
2014-07-15 13:36:10 -04:00
Jesse Glick 84d49ceef2 [JENKINS-14749] Suppress warnings about expected exception from prototype.js#HAS_EXTENDED_CREATE_ELEMENT_SYNTAX. 2014-07-15 09:37:00 -04:00
Jesse Glick 759c8a52ce [JENKINS-14749] Temporarily work around CSS errors by just suppressing the warnings until they can be fixed. 2014-07-15 09:22:47 -04:00
Jesse Glick d85fd687fe Toning down some uninteresting logging which just clutters test runs. 2014-07-15 09:02:10 -04:00
Jesse Glick 71469cea85 JUnit 4. 2014-07-15 08:40:48 -04:00
Daniel Beck 7b70bd96d7 Merge pull request #1189 from jeanblanchard/master
Fix changelog generation in ExtractResourceWithChangesSCM
2014-07-12 00:09:51 +02:00
Jesse Glick b7ec8578f9 [JENKINS-22395] Taking advantage of BuildReference.clear (just introduced in b6226ad) to simplify test by not requiring a custom build reference holder just to simulate GC.
Confirmed that dropLinksAfterGC and dropLinksAfterGC2 both fail in the expected way (b1a.nextBuild == b2) after commenting out the call to createReference().clear() in dropLinks.
(Also that they fail as expected in assertNotSame if the reference is not cleared at all.)
2014-07-11 10:56:00 -04:00
Kohsuke Kawaguchi 7b1b50c85a [JENKINS-22395] correcting the control test
As I step-executed the code, I discovered b2.getPreviousBuild() was getting invoked
between BRHF.drop(b1) and b2.dropLinks() call, in PeepholePermalink.RunListenerImpl.onDeleted()
because Run.delete() calls RunListener.fireDeleted(this).

Thus in effect the sequence of the call order was as follows:

        assertEquals(1, BRHF.drop(b1));
        b2.getPreviousBuild(); // happens indirectly in PeepholePermalink
        b2.delete();
        FreeStyleBuild b1a = b2.getPreviousBuild();

This defeats the purpose of the fix, because in this call sequence, by b2.dropLinks()
as implemented before f1430a2 will correctly fix up b1a.nextBuildR to b3.

For the test to work as intended, it is important that b2.previousBuildR.get()==null
during dropLinks(). That is what causes b2.getPreviousBuild() in the next line to go
load b1a, and sets up b1a.nextBuildR to b2, and trigger the assertion error.

Added a code to remove all RunListeners. With this change, the test now fails without
the fix in f1430a2.
2014-07-10 16:05:23 -07:00
Kohsuke Kawaguchi 53e95ee517 [JENKINS-22395]
I'm not sure if I understand how the original fix in PR #1190 (f1430a2) addresses the problem.

My understanding is of the problem is as follows:

  - someone deletes 'b2' but holds on to its reference (could be different threads)
  - someone calls b2.getPreviousBuild()
    - if b2.previousBuildR is null, then this triggers the loading of b1, and
      that process sets up a bi-di link via b1<->b2 via b1.nextBuildR <-> b2.previousBuildR
    - this makes b1.getNextBuild() incorrectly return b2

Presumably f1430a2 addresses this somehow, but I think I can induce this situation in other ways,
which is what dropLinksAfterGC2() does.

In this test,

initial state:

   b1 <-> b2 <-> b3

   we load everyone and connect them all up

after deleting b2:

   b1 <--------> b3
    ^            ^
    +---- b2 ----+

  b1 and b3 points each other, and b2 still refers to each side

after dropping b1:

          b2 --> b3

now, here, when I do b2.getPreviousBuild(), it loads b1a and it sets b1a.nextBuildR to b2.

    b1a <-> b2 --> b3

So I claim this is a proof that the fix is incomplete, even for the problem JENKINS-22395 has discovered.

I don't think that the problem is for the dropLinks call to fail to patch up references.
The problem is that b2.getPreviousBuild() forcing b1 to point to b2, because if b2 is deleted and assumed to be
invalid, then no matter what bX this method will find you never want bX.nextBuildR to point to b2.
2014-07-10 15:24:34 -07:00
Jesse Glick 5e39f687fb Suppressing NPE from SaveableListener.all during shutdown.
https://gist.githubusercontent.com/vivek/0d4d153cd9faad6e5743/raw/78a1d1b317894360c2ca06c7f4469f694ca7d573/gistfile1.java
2014-07-07 10:27:09 -04:00
Stephen Connolly a239197a8f Merge pull request #1294 from jenkinsci/pull/1265/head
[FIXED JENKINS-23294] Interpret X-Forwarded-Port
2014-07-07 10:36:56 +01:00
tfennelly f277502a83 New general layout using <div>s 2014-07-07 10:13:02 +01:00
Jesse Glick b9903dd89a Jenkins core does not automatically call Descriptor.load(), so JenkinsRule should not do so either.
Reverts 66528e4 so as to make test cases more faithful to real behavior.
2014-06-30 13:43:25 -04:00
Oleg Nenashev 6d5c25ae7e Merge pull request #1287 from nithril/master
[FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.)
2014-06-29 02:03:19 +04:00
Oliver Gondža 8274c989ae Merge pull request #1293 from olivergondza/master-listener
[FIXED JENKINS-23481][FIXED JENKINS-23551] Send onOffline notification to master computer prior Jenkins restart
2014-06-26 13:13:25 +02:00
Oliver Gondža 38799815bc [JENKINS-23551] Add test 2014-06-25 21:06:09 +02:00
Jesse Glick 3e44e1365e [FIXED JENKINS-23517] InstallerTranslator should gracefully ignore offline slaves. 2014-06-24 16:56:23 -04:00
nlabrot c726667162 [FIXED JENKINS-20086] Allow disabling use of default exclude patterns (.git, .svn, etc.) 2014-06-19 22:42:33 +02:00
Stephen Connolly 0ae4c2cff6 Somebody did not read the javadoc for the goTo method (urls not supposed to start with a /) 2014-06-19 14:38:52 +01:00
Stephen Connolly 454e510d8f Since the javadoc for the method says that the relative path should start without a leading '/' strip any leading '/' characters
- I had been tempted to throw IllegalArgumentException but that would break a lot of tests
2014-06-19 14:38:17 +01:00
Jesse Glick cffe9df017 [FIXED JENKINS-23294] Deal with X-Forwarded-Port.
If this is set, use it instead of ServletRequest.getServerPort() for purposes of getRootUrlFromRequest().
Also treat the default port as scheme-specific in that method (which presumes that we in fact got the reported port right).
And enhance the reverse proxy setup monitor to validate that the Referer header (/manage)
actually matches what we have computed from getRootUrlFromRequest;
if it does not, something is messed up, though it may require some digging to find what.
(Would be better to let the monitor specify the exact problem it determined,
though this is not always actually possible;
for example if you are missing AllowEncodedSlashes NoDecode in Apache,
you just get a 404 from Apache without even getting to Jenkins.)
2014-06-19 14:05:28 +01:00
Jesse Glick e1e7f1b93b [JENKINS-23191] Cannot reproduce problem in HtmlUnit test, but can at least guard against other regressions. 2014-06-16 12:22:12 -04:00
Oliver Gondža 6f02cd74ff Merge pull request #1269 from olivergondza/view-cli
[FIXED JENKINS-23361] Add CLI commands to add jobs to and remove jobs from views
2014-06-16 12:54:30 +02:00
Jesse Glick 78dcd063da MockFolderTest.moving pointed out a refinement to 1197e0c: list folders, if included, before their contents. 2014-06-11 16:47:01 -04:00
Jesse Glick d4b6430d11 Established test baseline for Items.getAllItems with sorting. 2014-06-11 12:59:35 -04:00
Jesse Glick 0f859a38b4 Automatically disable test timeout when running in a debugger.
(cherry picked from commit abf3359333)
2014-06-10 19:33:17 -04:00
Jesse Glick ea95434938 [FIXED JENKINS-19310] Provide correct links for build history inside a folder.
The basic fix is to use ${rootURL} plus full model object URLs rather than relying on ${jobBaseUrl}.
This is made trickier by the fact that the model object URLs are computed inside ProgressiveRendering.compute,
and therefore will not be correct when nondefault views are in the crumb trail unless the original request information is present.
So modifying ProgressiveRendering to preserve a copy of the original request for use during computation.
(This could probably be used to simplify parts of AsynchPeople as well.)
Also improving AbstractItem.getUrl to properly construct a URL including views even when the current page is not inside the item;
it should suffice for some ancestor of the current item (or a view thereof) to be in the ancestor list of this page.
2014-06-09 17:28:10 -04:00
Jesse Glick 00ab6012b8 [JENKINS-19310] Reproduced problem in test. 2014-06-09 13:58:48 -04:00
Jesse Glick 34f885b73f [FIXED JENKINS-23375] Incorrect redirect after deleting a folder. 2014-06-09 12:47:18 -04:00
Oliver Gondža a1c30c7b84 [FIXED JENKINS-23361] Add CLI commands to add jobs to and remove jobs from views. 2014-06-08 21:32:03 +02:00