[MAGNOLIA-5141] Integration tests should not run on an hardcoded port Created: 28/Jun/13  Updated: 19/May/22  Resolved: 19/May/22

Status: Closed
Project: Magnolia
Component/s: build
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Magnolia International Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Hudson / Jenkins


Issue Links:
Cloners
clones MGNLEE-289 Integration tests should not run on a... Open
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

When starting up Jetty for integration tests, we currently use port 8088. When running this build in parallel with other builds, this obviously clashes and reports false negatives.

Maven and Hudson have plugins to remediate that.



 Comments   
Comment by Philip Mundt [ 04/Jul/13 ]

Deactivated the random port plugin from maven, as we ran into PermGen issues on CI (master only).

Comment by Philip Mundt [ 04/Jul/13 ]

git commit 2e28f664e605676aa0ec37dc4fa5199d78b1d22f
git commit 5272406b98d98774bb00971c2a7d8f416d227656

Comment by Magnolia International [ 04/Jul/13 ]

We did do some improvements to the pom to make this possible (hopefully in the future), but since the core "feature" (i.e using a "random" port) is disabled, I'd rather keep this ticket open and re-schedule it.

Comment by Jan Haderka [ 24/Jul/13 ]

[12:51 PM] Grégory Joseph: -5141 is reopened, changes rolled back. Not likely to fix in 5.0.2 unless we magically find the reason it failed on hudson

Comment by Magnolia International [ 20/Aug/14 ]

So far we've used the Maven plugin for this: http://mojo.codehaus.org/build-helper-maven-plugin/reserve-network-port-mojo.html
Jenkins has one too that seems very similar: https://wiki.jenkins-ci.org/display/JENKINS/Port+Allocator+Plugin

AFAIK both have the potential to clash anyway, in that they don't actually open the port, but just find the first free one.

I analyzed the Maven plugin code, and it is not random at all; it looks like it's just iterating on a range of integers until one of the ports is free - unless I'm missing something, this means the probably of "reserving" the same port by 2 concurrent builds is quite high, since despite all the locking the plugin tries to do, the plugins will be running in different JVMs. (It frees the port up immediately after the loop)

Comment by Magnolia International [ 20/Aug/14 ]

Currently running a test off of the rnd-ports branch at http://jenkins.magnolia-cms.com/job/zzz_test_ce-bundle-with-selenium-tests-and-RANDOM-PORTS/ (since we suspected it might be due to Jenkins itself)

If this is successful - one question - do we actually need this to be a profile ? Can't it just be the default case ?

Comment by Roman Kovařík [ 19/May/22 ]

Hello,

This ticket is now marked as closed due to one of the following reasons:

  • A long period of inactivity
  • Uses an old or Beta version of an application, module, or framework that we no longer support
  • The issue is no longer reproducible or has been fixed in later versions

If you are still facing a problem or consider this issue still relevant, please feel free to re-open the ticket and we will reach out to you.

Thank you,
The Magnolia Team

Generated at Mon Feb 12 04:02:22 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.