Skip to content

monkeypatchingly fix #14331 by restarting vnc container (geb) #14995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 7.0.x
Choose a base branch
from

Conversation

JonasPammer
Copy link
Contributor

@JonasPammer JonasPammer commented Aug 20, 2025

Original, Upstream Open Issue: testcontainers/testcontainers-java#3998

The other upstream solution that was suggested, i.e. testcontainers/testcontainers-java#577, seemed way out of bound / too big of a change (that also relies on internals and commands, i.e. volitale to flv.py changes) to hack into here

i also tried a non-reflection attempt, i.e. to manage an own vnc and disable the container's interbound one -- https://gitkraken.dev/link/drafts/3d723754-a136-45c9-bb6f-8cad74600a88?type=patch. but decided to commit this here for comments.

i know reflection code will have a low chance. but at least this also contains a test one could add with Spock-Annotation of "Fails right now".

Edit: Closes #14331

Copy link
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @JonasPammer & Great Work Around!

My only concern is not cleaning up the recordings - can we clean those up unless some setting is set? Otherwise, running grails tests locally will constantly add more recordings.

//}
tasks.withType(Test).configureEach {
systemProperty('grails.geb.recording.mode', 'RECORD_ALL')
systemProperty('grails.geb.recording.restartPerTest', 'true')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a doLast { } and remove the recordings after a test run? Otherwise it will continually add them every run locally.

@@ -64,6 +65,7 @@ class GrailsGebSettings {
recordingFormat = VncRecordingFormat.valueOf(
System.getProperty('grails.geb.recording.format', DEFAULT_RECORDING_FORMAT.name())
)
recordingRestartPerTest = Boolean.parseBoolean(System.getProperty('grails.geb.recording.restartPerTest', false.toString()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdaugherty @jamesfredley Since this is correcting default behavior that is unwanted. Should this be enabled by default so current build files without the new setting start working correctly?

@cbmarcum
Copy link
Contributor

@JonasPammer Thank you for working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

All recording files are the same (4.1.1)
4 participants