test.functional: fixed minor transaction issues
This commit is contained in:
parent
8e5d2f5b53
commit
9f0cdd3457
|
@ -28,15 +28,10 @@
|
|||
***********************************************************************/
|
||||
package test.functional;
|
||||
|
||||
//import org.compiere.model.I_AD_Alert;
|
||||
//import org.compiere.model.I_AD_AlertProcessor;
|
||||
import org.compiere.model.MAlert;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.X_AD_Alert;
|
||||
import org.compiere.model.X_AD_AlertProcessor;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Trx;
|
||||
|
||||
import test.AdempiereTestCase;
|
||||
|
||||
|
@ -58,16 +53,14 @@ public class AlertTest extends AdempiereTestCase
|
|||
*/
|
||||
public void testAlertCreation() throws Exception
|
||||
{
|
||||
Trx trx = Trx.get(Trx.createTrxName("Test"), true);
|
||||
trx.start();
|
||||
log.info("trx = " + trx.toString());
|
||||
log.info("trx = " + getTrxName());
|
||||
boolean resultSave = false;
|
||||
|
||||
//----- Old way:
|
||||
MAlert alertOldWay = new MAlert(Env.getCtx(), 100, trx.getTrxName());
|
||||
MAlert alertOldWay = new MAlert(Env.getCtx(), 100, getTrxName());
|
||||
log.info(alertOldWay.toString());
|
||||
|
||||
X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), trx.getTrxName());
|
||||
X_AD_AlertProcessor alertProcessorOldWay = new X_AD_AlertProcessor(Env.getCtx(), alertOldWay.getAD_AlertProcessor_ID(), getTrxName());
|
||||
log.info("alertProcessorOldWay.getAD_AlertProcessor_ID = " + alertProcessorOldWay.getAD_AlertProcessor_ID());
|
||||
|
||||
alertOldWay.setDescription("Trifon test");
|
||||
|
@ -95,8 +88,7 @@ public class AlertTest extends AdempiereTestCase
|
|||
System.out.println("New value of Description = " + alert.getDescription());
|
||||
*/
|
||||
|
||||
trx.commit();
|
||||
trx.close();
|
||||
commit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -533,7 +533,7 @@ public class MBPartnerLocationTest extends AdempiereTestCase {
|
|||
m_group.setPriorityBase(MBPGroup.PRIORITYBASE_Same);
|
||||
m_group.save();
|
||||
|
||||
m_partner = new MBPartner (getCtx(), 0, "test");
|
||||
m_partner = new MBPartner (getCtx(), 0, getTrxName());
|
||||
m_partner.setValue ("");
|
||||
m_partner.setName ("Test Business Partner Location");
|
||||
m_partner.setName2 (null);
|
||||
|
@ -553,7 +553,7 @@ public class MBPartnerLocationTest extends AdempiereTestCase {
|
|||
m_partner.setBPGroup(m_group);
|
||||
// Reset Created, Updated to current system time ( teo_sarca )
|
||||
if(m_partner.save()) {
|
||||
bpl = new MBPartnerLocation (getCtx(), 0, "test");
|
||||
bpl = new MBPartnerLocation (getCtx(), 0, getTrxName());
|
||||
bpl.setIsActive(true);
|
||||
bpl.setName("Test Business Partner Location");
|
||||
bpl.setC_BPartner_ID(m_partner.get_ID());
|
||||
|
|
Loading…
Reference in New Issue