Hi,
I am looking at the bug severity definitions and it isn't obvious to me
at what level one should classify a bug related to a build failure. The
problem I see is that ConsultRequestDaoTest throws an exception related
to missing tables on both master and RELEASE_15_BETA.
The following simple change resolves the issue, at least for my build.
Since the order of testing by JUnit isn't deterministic, it is
conceivable that other tables also need to be restored for some
environments.
diff --git
a/src/test/java/org/oscarehr/common/dao/ConsultRequestDaoTest.java
b/src/test/java/org/oscarehr/common/dao/ConsultRequestDaoTest.java
index 9972130..1a1fdbf 100644
--- a/src/test/java/org/oscarehr/common/dao/ConsultRequestDaoTest.java
+++ b/src/test/java/org/oscarehr/common/dao/ConsultRequestDaoTest.java
@@ -48,7 +48,7 @@ public class ConsultRequestDaoTest extends
DaoTestFixtures {
@Before
public void before() throws Exception {
- SchemaUtils.restoreTable("consultationRequests",
"consultationServices", "demographic");
+ SchemaUtils.restoreTable("consultationRequests",
"consultationServices", "demographic", "admission", "program");
}
@Test
An example of what the build error looks like because the 'admission'
table doesn't exist:
Running org.oscarehr.common.dao.ConsultRequestDaoTest
2015-09-28 14:45:44,779 INFO [DaoTestFixtures:121] Setting up spring
took 0 seconds.
2015-09-28 14:45:44,785 WARN [EntityDataGenerator:112] Can't generate
test data for class type:class
org.oscarehr.common.model.ProfessionalSpecialist
2015-09-28 14:45:44,816 WARN [EntityDataGenerator:112] Can't generate
test data for class type:class
org.oscarehr.common.model.ProfessionalSpecialist
2015-09-28 14:45:44,819 WARN [EntityDataGenerator:112] Can't generate
test data for class type:class
org.oscarehr.common.model.ProfessionalSpecialist
2015-09-28 14:45:44,820 WARN [EntityDataGenerator:112] Can't generate
test data for class type:class
org.oscarehr.common.model.ProfessionalSpecialist
2015-09-28 14:45:44,822 WARN [EntityDataGenerator:112] Can't generate
test data for class type:class
org.oscarehr.common.model.ProfessionalSpecialist
2015-09-28 14:45:44,824 WARN [EntityDataGenerator:112] Can't generate
test data for class type:class
org.oscarehr.common.model.ProfessionalSpecialist
2015-09-28 14:45:44,828 INFO [ConsultRequestDao:153] sql=select
cr,specialist,cs,d,p from ConsultationRequest cr left outer join
cr.professionalSpecialist specialist, Co
nsultationServices cs, Demographic d left outer join d.provider p where
d.DemographicNo = cr.demographicId and cs.id = cr.serviceId and
cr.status = '1' and cr.sendTo = 't
ttt1' and cr.urgency = 'u1' and cr.demographicId = 1 ORDER BY
cr.referralDate desc
Sep 28, 2015 2:45:44 PM org.hibernate.util.JDBCExceptionReporter
logExceptions
WARNING: SQL Error: 1146, SQLState: 42S02
Sep 28, 2015 2:45:44 PM org.hibernate.util.JDBCExceptionReporter
logExceptions
SEVERE: Table 'oscar_test.admission' doesn't exist
[...]
Tests in error:
testSearch(org.oscarehr.common.dao.ConsultRequestDaoTest):
org.hibernate.excep
tion.SQLGrammarException: could not execute query
Tests run: 1792, Failures: 0, Errors: 1, Skipped: 15
Raymond
|