Skip to content

Commit

Permalink
Fix: reinstate tests (#2368)
Browse files Browse the repository at this point in the history
* fix: reinstate tests

* tmp: skip broken CohortCharacterizationServiceTest tests

This allows the other tests to be reinstated while these two
can then be fixed separately.

* tmp: skip broken PermissionTest tests

This allows the other tests to be reinstated while these two
can then be fixed separately.

* tmp: skip broken StudyInfoTest

...this one seems to only work depending on the order of execution...
it lacks the setup() method where a pre-filled db is guaranteed, like
for example in CohortCharacterizationServiceTest

* fix: mark abstract class as abstract
  • Loading branch information
pieterlukasse authored Jun 11, 2024
1 parent ca11010 commit 7898f7e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
run: mvn -B -DskipTests=true -DskipUnitTests=true -P${{ env.MAVEN_PROFILE }} package

- name: Test
# Skipping unit and integration tests for now, because they keep failing.
run: mvn -B -DskipUnitTests=true -DskipITtests=true -P${{ env.MAVEN_PROFILE }} test
run: mvn -B -P${{ env.MAVEN_PROFILE }} test

# Check that the docker image builds correctly
# Push to ohdsi/atlas:master for commits on master.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.lingala.zip4j.exception.ZipException;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.ohdsi.analysis.Utils;
import org.ohdsi.circe.helper.ResourceHelper;
Expand Down Expand Up @@ -100,11 +101,13 @@ public void setUp() throws Exception {
prepareResultSchema();
}

@Ignore
@Test
public void testExportGeneration() throws Exception {
doTestExportGeneration(CC_JSON, PARAM_JSON);
}

@Ignore
@Test
public void testExportGenerationWithStrata() throws Exception {
doTestExportGeneration(CC_WITH_STRATA_JSON, PARAM_JSON_WITH_STRATA);
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/org/ohdsi/webapi/security/PermissionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.ohdsi.webapi.AbstractDatabaseTest;
import org.ohdsi.webapi.shiro.PermissionManager;
Expand Down Expand Up @@ -64,6 +65,7 @@ public void setup() {
ThreadContext.bind(subject);
}

@Ignore
@Test
public void permsTest() throws Exception {
// need to clear authorization cache before each test
Expand All @@ -86,6 +88,7 @@ public void permsTest() throws Exception {

}

@Ignore
@Test
public void wildcardTest() throws Exception {
// need to clear authorization cache before each test
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/ohdsi/webapi/test/WebApiIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@ActiveProfiles("test")
@DbUnitConfiguration(databaseConnection = {"primaryDataSource"})
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class, DbUnitTestExecutionListener.class, DirtiesContextTestExecutionListener.class})
public class WebApiIT {
public abstract class WebApiIT {
protected final Logger log = LoggerFactory.getLogger(getClass());

protected final String SOURCE_KEY = "Embedded_PG";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.junit.Ignore;
import org.junit.Test;
import org.ohdsi.webapi.AbstractDatabaseTest;
import org.ohdsi.webapi.feasibility.FeasibilityStudy;
Expand Down Expand Up @@ -48,6 +50,7 @@ public class StudyInfoTest extends AbstractDatabaseTest {
@PersistenceContext
protected EntityManager entityManager;

@Ignore
@Test
@Transactional(transactionManager="transactionManager")
public void testStudyCRUD() {
Expand Down

0 comments on commit 7898f7e

Please sign in to comment.