Package mockit

Examples of mockit.NonStrictExpectations


    verifyLimitCount(bitContext, connection, "test1.json", 5);
  }

  @Test
  public void testLimitNoEnd(@Injectable final DrillbitContext bitContext, @Injectable UserServer.UserClientConnection connection) throws Throwable{
    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getConfig(); result = c;
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here


  // The testcase is not valid. "test4.json" using increasingBigInt(0) to generate a list of increasing number starting from 0, and verify the sum.
  // However, when evaluate the increasingBitInt(0), if the outgoing batch could not hold the new value, doEval() return false, and start the
  // next batch. But the value has already been increased by 1 in the prior failed try. Therefore, the sum of the generated number could be different,
  // depending on the size of each outgoing batch, and when the batch could not hold any more values.
  public void testLimitAcrossBatches(@Injectable final DrillbitContext bitContext, @Injectable UserServer.UserClientConnection connection) throws Throwable{
    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getConfig(); result = c;
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here

    private void testHJMockScanCommon(final DrillbitContext bitContext, UserServer.UserClientConnection connection, String physicalPlan, int expectedRows) throws Throwable {
      final LocalPStoreProvider provider = new LocalPStoreProvider(c);
      provider.start();
      final SystemOptionManager opt = new SystemOptionManager(c, provider);
      opt.init();
        new NonStrictExpectations(){{
            bitContext.getMetrics(); result = new MetricRegistry();
            bitContext.getAllocator(); result = new TopLevelAllocator();
            bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
            bitContext.getConfig(); result = c;
            bitContext.getOptionManager(); result = opt;
View Full Code Here

   }

    public void runTest(@Injectable final DrillbitContext bitContext,
                        @Injectable UserServer.UserClientConnection connection, Object[] expectedResults, String planPath) throws Throwable {

      new NonStrictExpectations(){{
        bitContext.getMetrics(); result = new MetricRegistry();
        bitContext.getAllocator(); result = new TopLevelAllocator();
        bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
        bitContext.getConfig(); result = c;
        bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here

  @Test
  @Ignore // this doesn't have a sort.  it also causes an infinite loop.  these may or may not be related.
  public void simpleEqualityJoin(@Injectable final DrillbitContext bitContext,
                                 @Injectable UserServer.UserClientConnection connection) throws Throwable {

    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getConfig(); result = c;
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here

  @Test
  @Ignore
  public void orderedEqualityLeftJoin(@Injectable final DrillbitContext bitContext,
                                      @Injectable UserServer.UserClientConnection connection) throws Throwable {

    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getConfig(); result = c;
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here

  @Test
  @Ignore
  public void orderedEqualityInnerJoin(@Injectable final DrillbitContext bitContext,
                                       @Injectable UserServer.UserClientConnection connection) throws Throwable {

    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getConfig(); result = c;
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here

  @Test
  @Ignore
  public void orderedEqualityMultiBatchJoin(@Injectable final DrillbitContext bitContext,
                                            @Injectable UserServer.UserClientConnection connection) throws Throwable {

    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();
      bitContext.getConfig(); result = c;
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here

  }

  @Test
  public void testJoinBatchSize(@Injectable final DrillbitContext bitContext, @Injectable UserClientConnection connection) throws Throwable{
    new NonStrictExpectations(){{
      bitContext.getMetrics(); result = new MetricRegistry();
      bitContext.getAllocator(); result = new TopLevelAllocator();;
      bitContext.getConfig(); result = c;
      bitContext.getOperatorCreatorRegistry(); result = new OperatorCreatorRegistry(c);
      bitContext.getCompiler(); result = CodeCompiler.getTestCompiler(c);
View Full Code Here

    final BootStrapContext c = new BootStrapContext(DrillConfig.create());
    BootStrapContext c2 = new BootStrapContext(DrillConfig.create());


    new NonStrictExpectations(){{
      workBus.getOrCreateFragmentManager((FragmentHandle) any); result = fman;
      workBus.getFragmentManager( (FragmentHandle) any); result = fman;
      fman.getFragmentContext(); result = fcon;
      fcon.getAllocator(); result = c.getAllocator();
  }};
View Full Code Here

TOP

Related Classes of mockit.NonStrictExpectations

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.