From 707b173ce37783c13c8967aad56a52c26cfecbf1 Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Thu, 2 May 2024 19:36:37 +0200 Subject: [PATCH 1/5] fix: reinstate tests --- .github/workflows/ci.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a06eecce18..21492840f4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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. From 5ea83a4623129a14cb794d138f740394036c49cc Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Fri, 3 May 2024 22:01:00 +0200 Subject: [PATCH 2/5] tmp: skip broken CohortCharacterizationServiceTest tests This allows the other tests to be reinstated while these two can then be fixed separately. --- .../CohortCharacterizationServiceTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/org/ohdsi/webapi/cohortcharacterization/CohortCharacterizationServiceTest.java b/src/test/java/org/ohdsi/webapi/cohortcharacterization/CohortCharacterizationServiceTest.java index 324fb302c9..b1e511c74e 100644 --- a/src/test/java/org/ohdsi/webapi/cohortcharacterization/CohortCharacterizationServiceTest.java +++ b/src/test/java/org/ohdsi/webapi/cohortcharacterization/CohortCharacterizationServiceTest.java @@ -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; @@ -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); From ec6e298231130c7a2e8ade26ae875ede21b9bebb Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Thu, 30 May 2024 13:31:30 +0200 Subject: [PATCH 3/5] tmp: skip broken PermissionTest tests This allows the other tests to be reinstated while these two can then be fixed separately. --- src/test/java/org/ohdsi/webapi/security/PermissionTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/org/ohdsi/webapi/security/PermissionTest.java b/src/test/java/org/ohdsi/webapi/security/PermissionTest.java index c8a83be095..1aedd9a44c 100644 --- a/src/test/java/org/ohdsi/webapi/security/PermissionTest.java +++ b/src/test/java/org/ohdsi/webapi/security/PermissionTest.java @@ -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; @@ -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 @@ -86,6 +88,7 @@ public void permsTest() throws Exception { } + @Ignore @Test public void wildcardTest() throws Exception { // need to clear authorization cache before each test From ccc748b5534debeefa0bb67c4eebc9ee1c1cc281 Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Thu, 30 May 2024 14:18:38 +0200 Subject: [PATCH 4/5] 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 --- .../java/org/ohdsi/webapi/test/feasibility/StudyInfoTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/java/org/ohdsi/webapi/test/feasibility/StudyInfoTest.java b/src/test/java/org/ohdsi/webapi/test/feasibility/StudyInfoTest.java index 423d5e0b74..70d561e094 100644 --- a/src/test/java/org/ohdsi/webapi/test/feasibility/StudyInfoTest.java +++ b/src/test/java/org/ohdsi/webapi/test/feasibility/StudyInfoTest.java @@ -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; @@ -48,6 +50,7 @@ public class StudyInfoTest extends AbstractDatabaseTest { @PersistenceContext protected EntityManager entityManager; + @Ignore @Test @Transactional(transactionManager="transactionManager") public void testStudyCRUD() { From 7f084e297e8e9b1f92ab64be08da07fe133c2907 Mon Sep 17 00:00:00 2001 From: pieterlukasse Date: Thu, 30 May 2024 16:12:07 +0200 Subject: [PATCH 5/5] fix: mark abstract class as abstract --- src/test/java/org/ohdsi/webapi/test/WebApiIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/ohdsi/webapi/test/WebApiIT.java b/src/test/java/org/ohdsi/webapi/test/WebApiIT.java index 4892cec615..dd7dd57c0d 100644 --- a/src/test/java/org/ohdsi/webapi/test/WebApiIT.java +++ b/src/test/java/org/ohdsi/webapi/test/WebApiIT.java @@ -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";