Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import org.openmrs.api.context.Context;
import org.openmrs.module.initializer.DomainBaseModuleContextSensitiveTest;
import org.openmrs.module.initializer.api.loaders.LiquibaseLoader;
import org.openmrs.util.DatabaseUpdater;
import org.springframework.beans.factory.annotation.Autowired;

import static org.hamcrest.Matchers.nullValue;
Expand All @@ -25,15 +26,8 @@ public class LiquibaseLoaderIntegrationTest extends DomainBaseModuleContextSensi
@Autowired
private LiquibaseLoader loader;

@Before
public void setup() {
System.setProperty("useInMemoryDatabase", "true");
}

@Test
public void load_shouldLoadStructuredLiquibaseChangesets() throws Exception {
// TODO This test fails on GitHub Actions but the failure cannot be reproduced so for now, skip it
assumeThat(System.getenv("GITHUB_ENV"), nullValue());

// Replay
loader.load();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public void unProxy_shouldReturnOriginalClassName() {
Assert.assertEquals("EncounterType", Utils.unProxy("EncounterType_$$_javassist_26"));
Assert.assertEquals("EncounterType", Utils.unProxy("EncounterType"));
}

@Test
public void fetchConcept_shouldFetchConceptByUuid() {
ConceptService cs = mock(ConceptService.class);
Expand All @@ -300,7 +300,7 @@ public void fetchConcept_shouldFetchConceptByUuid() {
when(cs.getConceptByName("concept:lookup")).thenReturn(nameConcept);
Assert.assertEquals(uuidConcept, Utils.fetchConcept("concept:lookup", cs));
}

@Test
public void fetchConcept_shouldFetchConceptByMapping() {
ConceptService cs = mock(ConceptService.class);
Expand All @@ -311,7 +311,7 @@ public void fetchConcept_shouldFetchConceptByMapping() {
when(cs.getConceptByName("concept:lookup")).thenReturn(nameConcept);
Assert.assertEquals(mappingConcept, Utils.fetchConcept("concept:lookup", cs));
}

@Test
public void fetchConcept_shouldFetchConceptByName() {
ConceptService cs = mock(ConceptService.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ private Liquibase getLiquibase(String filename) throws Exception {
Database liquibaseConnection = DatabaseFactory.getInstance()
.findCorrectDatabaseImplementation(new JdbcConnection(getConnection()));

liquibaseConnection.setDatabaseChangeLogTableName("LIQUIBASECHANGELOG");
liquibaseConnection.setDatabaseChangeLogLockTableName("LIQUIBASECHANGELOGLOCK");
liquibaseConnection.setDatabaseChangeLogTableName("LIQUIBASECHANGELOG_TEST");
liquibaseConnection.setDatabaseChangeLogLockTableName("LIQUIBASECHANGELOGLOCK_TEST");

return new Liquibase(filename, new ClassLoaderResourceAccessor(getClass().getClassLoader()), liquibaseConnection);
}
Expand Down