Package org.xtreemfs.babudb.sandbox

Examples of org.xtreemfs.babudb.sandbox.ContinuesRandomGenerator$InsertGroup


    Random random = new Random();

    for (int i=0;i<NO_TESTS_PER_CASE;i++){
      long testSeed = ContinuesRandomGenerator.getRandomSeed();
      long seqNo = random.nextInt(MAX_SEQ)+ContinuesRandomGenerator.MIN_SEQUENCENO;
      assertEquals(new ContinuesRandomGenerator(testSeed,seqNo).toString(),
             new ContinuesRandomGenerator(testSeed,seqNo).toString());
    }
  }
View Full Code Here


  public void testLSNInsertGroup() throws Exception {
    // initialization
    Random random = new Random();
    long testSeed = ContinuesRandomGenerator.getRandomSeed();
    long seqNo = random.nextInt(MAX_SEQ)+ContinuesRandomGenerator.MIN_SEQUENCENO;
        ContinuesRandomGenerator testGen1 = new ContinuesRandomGenerator(testSeed, seqNo);
        ContinuesRandomGenerator testGen2 = new ContinuesRandomGenerator(testSeed, seqNo);
   
    long sequenceNO = random.nextInt((int) (ContinuesRandomGenerator.MAX_SEQUENCENO-1L))+1L;
   
    for (int i=0;i<NO_TESTS_PER_CASE;i++){
      assertEquals(testGen1.getInsertGroup(sequenceNO).toString(), testGen2.getInsertGroup(sequenceNO).toString());
    }
  }
View Full Code Here

  public void testLSNLookUpGroup() throws Exception {
    // initialization
    Random random = new Random();
    long testSeed = ContinuesRandomGenerator.getRandomSeed();
    long seqNo = random.nextInt(MAX_SEQ)+ContinuesRandomGenerator.MIN_SEQUENCENO;
        ContinuesRandomGenerator testGen1 = new ContinuesRandomGenerator(testSeed, seqNo);
        ContinuesRandomGenerator testGen2 = new ContinuesRandomGenerator(testSeed, seqNo);
 
    for (int i=0;i<NO_TESTS_PER_CASE;i++){
      long sequenceNO = random.nextInt((int) (ContinuesRandomGenerator.MAX_SEQUENCENO-1L))+1L;
      assertEquals(testGen1.getLookupGroup(sequenceNO).toString(), testGen2.getLookupGroup(sequenceNO).toString());
    }   
  }
View Full Code Here

  public void testCrossComparison() throws Exception {
    // initialization
    Random random = new Random();
    long testSeed = ContinuesRandomGenerator.getRandomSeed();
    long seqNo = random.nextInt(MAX_SEQ)+ContinuesRandomGenerator.MIN_SEQUENCENO;
        ContinuesRandomGenerator testGen1 = new ContinuesRandomGenerator(testSeed, seqNo);
        ContinuesRandomGenerator testGen2 = new ContinuesRandomGenerator(testSeed, seqNo);
   
    for (int i=0;i<NO_TESTS_PER_CASE;i++){
      long sequenceNO = random.nextInt((int) (ContinuesRandomGenerator.MAX_SEQUENCENO-1L))+1L;
      assertEquals(testGen1.getInsertGroup(sequenceNO).lookUpCompareable(),testGen2.getLookupGroup(sequenceNO).toString());
      assertEquals(testGen2.getInsertGroup(sequenceNO).lookUpCompareable(),testGen1.getLookupGroup(sequenceNO).toString());
    }
  }
View Full Code Here

TOP

Related Classes of org.xtreemfs.babudb.sandbox.ContinuesRandomGenerator$InsertGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.