<commit_before>package com.gentics.mesh.cli;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import org.junit.Test;

import com.gentics.mesh.test.AbstractIntegrationTest;

public class MeshIntegerationTest extends AbstractIntegrationTest {

	@Test
	public void testStartup() throws Exception {
		long timeout = DEFAULT_TIMEOUT_SECONDS * 2;

		final Mesh mesh = Mesh.mesh();
		final AtomicBoolean customLoaderInvoked = new AtomicBoolean(false);
		final AtomicBoolean meshStarted = new AtomicBoolean(false);
		mesh.setCustomLoader((vertx) -> {
			customLoaderInvoked.set(true);
		});
		final CountDownLatch latch = new CountDownLatch(1);

		new Thread(() -> {
			try {
				mesh.run(() -> {
					assertTrue("The custom loader was not invoked during the startup process", customLoaderInvoked.get());
					meshStarted.set(true);
					latch.countDown();<commit_msg>Fix mesh integration test<commit_after>package com.gentics.mesh.cli;

import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

import org.junit.Test;

import com.gentics.mesh.test.AbstractIntegrationTest;

public class MeshIntegerationTest extends AbstractIntegrationTest {

	@Test
	public void testStartup() throws Exception {
		long timeout = DEFAULT_TIMEOUT_SECONDS * 2;

		Mesh.initalize();
		final Mesh mesh = Mesh.mesh();

		final AtomicBoolean customLoaderInvoked = new AtomicBoolean(false);
		final AtomicBoolean meshStarted = new AtomicBoolean(false);
		mesh.setCustomLoader((vertx) -> {
			customLoaderInvoked.set(true);
		});
		final CountDownLatch latch = new CountDownLatch(1);

		new Thread(() -> {
			try {
				mesh.run(() -> {
					assertTrue("The custom loader was not invoked during the startup process", customLoaderInvoked.get());
					meshStarted.set(true);
					latch.countDown();
{'fraction_non_alphanumeric': 0.10359712230215827, 'fraction_numerical': 0.0019184652278177458, 'mean_word_length': 4.909348441926346, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '374641', 'n_tokens_mistral': 680, 'n_tokens_neox': 611, 'n_words': 145}