Skip to content

Commit

Permalink
Merge pull request #1660 from magicdoom/1.6
Browse files Browse the repository at this point in the history
 解决编译和单元测试错误
  • Loading branch information
magicdoom committed Oct 2, 2017
2 parents 8cf5282 + cff621c commit 8b8c1ff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private static Class<?> getParameterizedClass(Field field) {
if (pt.getActualTypeArguments() == null || pt.getActualTypeArguments().length == 0) {
return null;
}
parameterizedType = pt.getActualTypeArguments()[0].getTypeName();
parameterizedType = pt.getActualTypeArguments()[0].toString();
} else {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/mycat/config/model/SystemConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public final class SystemConfig {
private static final String DEFAULT_CLUSTER_HEARTBEAT_PASS = "_HEARTBEAT_PASS_";
private static final int DEFAULT_PARSER_COMMENT_VERSION = 50148;
private static final int DEFAULT_SQL_RECORD_COUNT = 10;
private static final boolean DEFAULT_USE_ZK_SWITCH = true;
private static final boolean DEFAULT_USE_ZK_SWITCH = false;
private int maxStringLiteralLength = 65535;
private int frontWriteQueueSize = 2048;
private String bindIp = "0.0.0.0";
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@


<!--是否采用zookeeper协调切换 -->
<property name="useZKSwitch">true</property>
<property name="useZKSwitch">false</property>

<!-- XA Recovery Log日志路径 -->
<!--<property name="XARecoveryLogBaseDir">./</property>-->
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/io/mycat/buffer/TestByteBufferArena.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public void testAllocate() {

@Test
public void testAllocateDirect() {
int pageSize = 1024 * 1024 * 100;
int allocTimes = 1024;
int pageSize = 1024 ;
int allocTimes = 100;
DirectByteBufferPool pool = new DirectByteBufferPool(pageSize, (short) 256, (short) 8,0);
long start = System.currentTimeMillis();
for (int i = 0; i < allocTimes; i++) {
Expand All @@ -65,7 +65,7 @@ public void testAllocateDirect() {
//System.out.println("recycle usage "+(System.nanoTime()-start));
}
long used = (System.currentTimeMillis() - start);
System.out.println("DirectByteBufferPool total used time " + used + " avg speed " + allocTimes / used);
// System.out.println("DirectByteBufferPool total used time " + used + " avg speed " + allocTimes / used);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class TestDirectByteBufferPool {

@Test
public void testAllocate() {
int pageSize = 1024 * 1024 * 100;
int pageSize = 1024 ;
int allocTimes = 1024;
DirectByteBufferPool pool = new DirectByteBufferPool(pageSize, (short) 256, (short) 8,0);
long start = System.currentTimeMillis();
Expand Down

0 comments on commit 8b8c1ff

Please sign in to comment.