Skip to content

Instantly share code, notes, and snippets.

@jfrantzius
jfrantzius / testing-podman-applehv.md
Last active August 5, 2024 10:33
Testing Podman applehv with Docker Compose + Testcontainers

Background on applehv vs. qemu

Podman with QEMU virtualization on Mac comes with a big performance-penalty for bind-mounts, see containers/podman#16994 .

As of 25.1.24, virtualization with Apple Hypervisor is available with the Podman Desktop pre-release 1.7.3

This Gist is supposed to keep track of how to install it and test it with Docker Compose and Testcontainers.

Known problems of 4.9.0

Beware that as of 26.1.24, containers/podman#21288 means that a reboot of the host (e.g. laptop) will invalidate the applehv machine, and the only known workaround is to delete and recreate it! The fix is already merged into main, but hasn't made it into 4.9.0

package com.aperto.javascript;
import org.junit.Test;
import javax.script.Invocable;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import javax.script.SimpleScriptContext;
@jfrantzius
jfrantzius / NashornClosureTest.java
Last active February 21, 2017 10:01
Failing test that verifies closures aren't thread-safe
package com.aperto.javascript;
import org.junit.Assert;
import org.junit.Test;
import javax.script.ScriptContext;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;