Skip to content

Commit

Permalink
use explicit types for picky drivers (postgres)
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Nov 29, 2007
1 parent 2f1602a commit ee7a697
Showing 1 changed file with 7 additions and 4 deletions.
Expand Up @@ -22,12 +22,14 @@
package org.jumpmind.symmetric;

import java.sql.Timestamp;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.sql.DataSource;

import org.apache.commons.lang.time.DateUtils;
import org.jumpmind.symmetric.common.Constants;
import org.jumpmind.symmetric.common.TestConstants;
import org.jumpmind.symmetric.model.OutgoingBatch;
Expand Down Expand Up @@ -109,15 +111,16 @@ public void testSyncToRoot() {
clientJdbcTemplate.update(insertOrderHeaderSql, new Object[] { "10",
"100", null, "2007-01-03" });
clientJdbcTemplate.update(insertOrderDetailSql, new Object[] { "10",
"1", "STK", "110000065", "3", "3.33" });
1, "STK", "110000065", 3, "3.33" });
clientEngine.push();
}

@Test(groups = "integration")
public void testSyncInsertCondition() {
public void testSyncInsertCondition() throws ParseException {
// Should not sync when status = null
Date date = DateUtils.parseDate("2007-01-02", new String [] { "yyyy-MM-dd" });
rootJdbcTemplate.update(insertOrderHeaderSql, new Object[] { "11",
"100", null, "2007-01-02" });
100, null, date });
clientEngine.pull();

IOutgoingBatchService outgoingBatchService = (IOutgoingBatchService) rootEngine
Expand All @@ -134,7 +137,7 @@ public void testSyncInsertCondition() {

// Should sync when status = C
rootJdbcTemplate.update(insertOrderHeaderSql, new Object[] { "12",
"100", "C", "2007-01-02" });
100, "C", date });
clientEngine.pull();
Assert.assertEquals(clientJdbcTemplate.queryForList(
selectOrderHeaderSql, new Object[] { "12" }).size(), 1,
Expand Down

0 comments on commit ee7a697

Please sign in to comment.