Commit 9ea2cd6d authored by Stephan Eberle's avatar Stephan Eberle
Browse files

Introduced new integration test helper method for safely updating model

file contents in a synchronized manner and reworked all affected
integration tests to let them use that helper method; made sure that all
integration test-initiated model-affecting operations are invoked
asynchronously to eliminate risk of deadlocks; made sure that model
files being changed in tests don't end up being out of sync by forcing a
local refresh in newly introduced test helper method for updating model
file contents
parent 33fd521a
Loading
Loading
Loading
Loading
+198 −205

File changed.

Preview size limit exceeded, changes collapsed.

+7 −6
Original line number Diff line number Diff line
/**
 * <copyright>
 *
 * Copyright (c) 2008-2013 See4sys, itemis and others.
 * Copyright (c) 2008-2019 See4sys, itemis and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
@@ -63,8 +63,8 @@ public class ModelConverterTest extends DefaultIntegrationTestCase {
				"fModelConverters");
		for (Iterator<IModelConverter> iter = modelConverters.iterator(); iter.hasNext();) {
			IModelConverter converter = iter.next();
			if (!(converter instanceof MockModelConverter && Hummingbird20MMCompatibility.HUMMINGBIRD_2_0_0_RESOURCE_DESCRIPTOR.equals(converter
					.getResourceVersionDescriptor()))) {
			if (!(converter instanceof MockModelConverter
					&& Hummingbird20MMCompatibility.HUMMINGBIRD_2_0_0_RESOURCE_DESCRIPTOR.equals(converter.getResourceVersionDescriptor()))) {
				iter.remove();
			}
		}
@@ -97,8 +97,9 @@ public class ModelConverterTest extends DefaultIntegrationTestCase {
		assertNotNull(modelConveter);

		// save the project to trigger model conversion
		ModelSaveManager.INSTANCE.saveProject(contextProject, false, new NullProgressMonitor());
		ModelLoadManager.INSTANCE.reloadProject(contextProject, false, false, null);
		ModelSaveManager.INSTANCE.saveProject(contextProject, true, new NullProgressMonitor());
		waitForModelSaving();
		ModelLoadManager.INSTANCE.reloadProject(contextProject, false, true, new NullProgressMonitor());
		waitForModelLoading();

		// Check that resource was converted
+368 −446

File changed.

Preview size limit exceeded, changes collapsed.

+141 −130

File changed.

Preview size limit exceeded, changes collapsed.

+115 −83

File changed.

Preview size limit exceeded, changes collapsed.

Loading