Skip to content

Commit

Permalink
dev checkin. fix for derby tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
chenson42 committed Feb 13, 2012
1 parent 3ea5f42 commit 1929a44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ public void insertCustomer(Customer customer) {
Types.TIMESTAMP, Types.CLOB, blobType });
}

public int updateCustomer(int id, String column, Object value) {
public int updateCustomer(int id, String column, Object value, int type) {
return sqlTemplate.update(
String.format("update test_customer set %s=? where customer_id=?", column), value,
id);
String.format("update test_customer set %s=? where customer_id=?", column), new Object[] {value,
id}, new int[] {type, Types.NUMERIC});
}

public Customer getCustomer(int id) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.jumpmind.symmetric.test;

import java.math.BigDecimal;
import java.sql.Types;
import java.util.Date;

import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.jumpmind.db.model.Table;
import org.jumpmind.symmetric.ISymmetricEngine;
import org.jumpmind.symmetric.TestConstants;
import org.jumpmind.symmetric.common.ParameterConstants;
Expand Down Expand Up @@ -203,8 +205,8 @@ public void syncToClientMultipleUpdates() {
final String NEW_NAME = "JoJo Duh Doh";

// now change some data that should be sync'd
serverTestService.updateCustomer(100, "zip", NEW_ZIP);
serverTestService.updateCustomer(100, "name", NEW_NAME);
serverTestService.updateCustomer(100, "zip", NEW_ZIP, Types.NUMERIC);
serverTestService.updateCustomer(100, "name", NEW_NAME, Types.VARCHAR);

boolean didPullData = getClient().pull().wasDataProcessed();

Expand Down Expand Up @@ -254,9 +256,10 @@ public void testEmptyNullLob() {
clientTestService.getCustomerIcon(300));
}

Table table = getServer().getSymmetricDialect().getPlatform().getTableFromCache("test_customer", false);
// Test null large object
serverTestService.updateCustomer(300, "notes", null);
serverTestService.updateCustomer(300, "icon", null);
serverTestService.updateCustomer(300, "notes", null, table.getColumnWithName("notes").getTypeCode());
serverTestService.updateCustomer(300, "icon", null, table.getColumnWithName("icon").getTypeCode());

clientPull();

Expand Down

0 comments on commit 1929a44

Please sign in to comment.