Skip to content

Commit 7898f7e

Browse files
Fix: reinstate tests (#2368)
* 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
1 parent ca11010 commit 7898f7e

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

.github/workflows/ci.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ jobs:
4343
run: mvn -B -DskipTests=true -DskipUnitTests=true -P${{ env.MAVEN_PROFILE }} package
4444

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

4948
# Check that the docker image builds correctly
5049
# Push to ohdsi/atlas:master for commits on master.

src/test/java/org/ohdsi/webapi/cohortcharacterization/CohortCharacterizationServiceTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import net.lingala.zip4j.exception.ZipException;
99
import org.apache.commons.lang3.builder.ToStringBuilder;
1010
import org.junit.Before;
11+
import org.junit.Ignore;
1112
import org.junit.Test;
1213
import org.ohdsi.analysis.Utils;
1314
import org.ohdsi.circe.helper.ResourceHelper;
@@ -100,11 +101,13 @@ public void setUp() throws Exception {
100101
prepareResultSchema();
101102
}
102103

104+
@Ignore
103105
@Test
104106
public void testExportGeneration() throws Exception {
105107
doTestExportGeneration(CC_JSON, PARAM_JSON);
106108
}
107109

110+
@Ignore
108111
@Test
109112
public void testExportGenerationWithStrata() throws Exception {
110113
doTestExportGeneration(CC_WITH_STRATA_JSON, PARAM_JSON_WITH_STRATA);

src/test/java/org/ohdsi/webapi/security/PermissionTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import static org.junit.Assert.assertFalse;
2626
import static org.junit.Assert.assertTrue;
2727
import org.junit.Before;
28+
import org.junit.Ignore;
2829
import org.junit.Test;
2930
import org.ohdsi.webapi.AbstractDatabaseTest;
3031
import org.ohdsi.webapi.shiro.PermissionManager;
@@ -64,6 +65,7 @@ public void setup() {
6465
ThreadContext.bind(subject);
6566
}
6667

68+
@Ignore
6769
@Test
6870
public void permsTest() throws Exception {
6971
// need to clear authorization cache before each test
@@ -86,6 +88,7 @@ public void permsTest() throws Exception {
8688

8789
}
8890

91+
@Ignore
8992
@Test
9093
public void wildcardTest() throws Exception {
9194
// need to clear authorization cache before each test

src/test/java/org/ohdsi/webapi/test/WebApiIT.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
@ActiveProfiles("test")
4242
@DbUnitConfiguration(databaseConnection = {"primaryDataSource"})
4343
@TestExecutionListeners({DependencyInjectionTestExecutionListener.class, DbUnitTestExecutionListener.class, DirtiesContextTestExecutionListener.class})
44-
public class WebApiIT {
44+
public abstract class WebApiIT {
4545
protected final Logger log = LoggerFactory.getLogger(getClass());
4646

4747
protected final String SOURCE_KEY = "Embedded_PG";

src/test/java/org/ohdsi/webapi/test/feasibility/StudyInfoTest.java

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
import javax.persistence.EntityManager;
1919
import javax.persistence.PersistenceContext;
20+
21+
import org.junit.Ignore;
2022
import org.junit.Test;
2123
import org.ohdsi.webapi.AbstractDatabaseTest;
2224
import org.ohdsi.webapi.feasibility.FeasibilityStudy;
@@ -48,6 +50,7 @@ public class StudyInfoTest extends AbstractDatabaseTest {
4850
@PersistenceContext
4951
protected EntityManager entityManager;
5052

53+
@Ignore
5154
@Test
5255
@Transactional(transactionManager="transactionManager")
5356
public void testStudyCRUD() {

0 commit comments

Comments
 (0)