Commit 526dbde6 authored by chiaming2000's avatar chiaming2000
Browse files

Simulator: update "max key range count" from 1024 to 200 to be

consistent with the limit set in the drive implementation.
parent fffada52
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -156,7 +156,7 @@ public class SimulatorConfiguration extends Properties {
    /**
     * max supported key range size.
     */
    private static int maxSupportedKeyRangeSize = 1024;
    private static int maxSupportedKeyRangeSize = 200;

    /**
     * max supported tag size.
+3 −3
Original line number Diff line number Diff line
@@ -338,7 +338,7 @@ public class KineticAdminTest extends IntegrationTestCase {
        assertTrue(log.getLimits().getMaxKeySize() == 4096);
        assertTrue(log.getLimits().getMaxValueSize() == 1024 * 1024);
        assertTrue(log.getLimits().getMaxVersionSize() == 2048);
        assertTrue(log.getLimits().getMaxKeyRangeCount() == 1024);
        assertTrue(log.getLimits().getMaxKeyRangeCount() == 200);
        // // TODO: To be validated
        // assertTrue(log.getLimits().getMaxTagSize() >= 0);
        // assertTrue(log.getLimits().getMaxOutstandingReadRequests() >= 0);
@@ -1448,7 +1448,7 @@ public class KineticAdminTest extends IntegrationTestCase {
        assertTrue(limits.getMaxKeySize() == 4096);
        assertTrue(limits.getMaxValueSize() == 1024 * 1024);
        assertTrue(limits.getMaxVersionSize() == 2048);
        assertTrue(limits.getMaxKeyRangeCount() == 1024);
        assertTrue(limits.getMaxKeyRangeCount() == 200);
        // // TODO: To be validated
        // assertTrue(limits.getMaxTagSize() >= 0);
        // assertTrue(limits.getMaxOutstandingReadRequests() >= 0);
@@ -1586,7 +1586,7 @@ public class KineticAdminTest extends IntegrationTestCase {
                .getLimits().getMaxValueSize());
        assertTrue(2048 == respond1.getCommand().getBody().getGetLog()
                .getLimits().getMaxVersionSize());
        assertTrue(1024 == respond1.getCommand().getBody().getGetLog()
        assertTrue(200 == respond1.getCommand().getBody().getGetLog()
                .getLimits().getMaxKeyRangeCount());
        // // TODO: To be validated
        // assertTrue(log.getLimits().getMaxTagSize() >= 0);
+5 −5
Original line number Diff line number Diff line
@@ -577,7 +577,7 @@ public class KineticBasicAPITest extends IntegrationTestCase {
    }

    /**
     * Test getKeyRange API result order with 0~255 hex. The entries have
     * Test getKeyRange API result order with 0~200 hex. The entries have
     * already existed in simulator/drive. For instance, 0x00 < 0x10 < 0x2a <
     * 0xbf
     * <p>
@@ -586,11 +586,11 @@ public class KineticBasicAPITest extends IntegrationTestCase {
     *             if any internal error occurred.
     */
    @Test
    public void testGetKeyRange_VerifyOrder_For0To255() throws KineticException {
    public void testGetKeyRange_VerifyOrder_For0To200() throws KineticException {
        List<byte[]> keys = new ArrayList<byte[]>();

        String hex = null;
        for (int i = 0; i < 255; i++) {
        for (int i = 0; i < 200; i++) {
            if (i < 16)
                hex = "0x0" + Integer.toHexString(i);
            else
@@ -604,9 +604,9 @@ public class KineticBasicAPITest extends IntegrationTestCase {
        }

        List<byte[]> keysRange = getClient().getKeyRange(new byte[] {}, true,
                toByteArray("0xff"), true, 500);
                toByteArray("0xff"), true, 200);

        assertEquals(255, keysRange.size());
        assertEquals(200, keysRange.size());
        // System.out.println("get key range order are as follows:");
        // for (byte[] key : keysRange) {
        // System.out.println(new String(key));