Skip to content

Commit

Permalink
make 2.6 the minimum version for the LoaderTest
Browse files Browse the repository at this point in the history
  • Loading branch information
mherman22 committed Nov 15, 2023
1 parent 4f391a0 commit 652b62e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 4 deletions.
7 changes: 7 additions & 0 deletions api-2.6/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>queue-api</artifactId>
<version>${queueVersion}</version>
<scope>provided</scope>
</dependency>

</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,22 @@
*/
package org.openmrs.module.initializer;

import org.openmrs.module.Module;
import org.openmrs.module.ModuleFactory;

import java.io.File;

public abstract class DomainBaseModuleContextSensitive_2_6_Test extends DomainBaseModuleContextSensitiveTest {

public DomainBaseModuleContextSensitive_2_6_Test() {
super();
{
Module mod = new Module("", "queue", "", "", "", "1.0.0");
mod.setFile(new File(""));
ModuleFactory.getStartedModulesMap().put(mod.getModuleId(), mod);
}
}

@Override
public void updateSearchIndex() {
// to prevent Data Filter's 'Illegal Record Access'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Copyright (C) OpenMRS Inc. OpenMRS is a registered trademark and the OpenMRS
* graphic logo is a trademark of OpenMRS Inc.
*/
package org.openmrs.module.initializer.api.loaders;
package org.openmrs.module.initializer.api;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.everyItem;
Expand All @@ -23,14 +23,16 @@
import org.hamcrest.TypeSafeDiagnosingMatcher;
import org.junit.Test;
import org.openmrs.module.initializer.Domain;
import org.openmrs.module.initializer.DomainBaseModuleContextSensitive_2_3_Test;
import org.openmrs.module.initializer.DomainBaseModuleContextSensitive_2_6_Test;
import org.openmrs.module.initializer.api.loaders.Loader;

public class LoadersOrderTest extends DomainBaseModuleContextSensitive_2_3_Test {
public class LoadersOrderTest extends DomainBaseModuleContextSensitive_2_6_Test {

@Test
public void getLoaders_shouldBeUnequivocallyOrdered() {
Loader previousLoader = null;


List<Loader> loaders = applicationContext.getBeansOfType(Loader.class).values().stream().sorted()
.collect(Collectors.toList());

Expand All @@ -45,6 +47,7 @@ public void getLoaders_shouldBeUnequivocallyOrdered() {

List<Loader> runtimeLoaders = getService().getLoaders();
assertThat(runtimeLoaders, everyItem(hasExpectedDomain()));

assertThat(runtimeLoaders, coversAllDomains());
}

Expand Down
6 changes: 6 additions & 0 deletions omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<artifactId>${project.parent.artifactId}-api-2.5</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>${project.parent.artifactId}-api-2.6</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>${project.parent.groupId}</groupId>
Expand Down
9 changes: 8 additions & 1 deletion validator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<properties>
<springVersion>4.1.4.RELEASE</springVersion>
<!-- OpenMRS Core and modules -->
<openmrsPlatformVersion>2.3.6</openmrsPlatformVersion>
<openmrsPlatformVersion>2.6.3-SNAPSHOT</openmrsPlatformVersion>
<reportingCompatibilityVersion>2.0.6</reportingCompatibilityVersion>
<htmlwidgetsVersion>1.7.2</htmlwidgetsVersion>
<mysqlTestContainerVersion>1.15.3</mysqlTestContainerVersion>
Expand Down Expand Up @@ -140,6 +140,13 @@
<type>jar</type>
</dependency>

<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>${project.parent.artifactId}-api-2.6</artifactId>
<version>${project.parent.version}</version>
<type>jar</type>
</dependency>

<dependency>
<groupId>org.openmrs.api</groupId>
<artifactId>openmrs-api</artifactId>
Expand Down

0 comments on commit 652b62e

Please sign in to comment.