org.junit.BeforeClass Java Examples

The following examples show how to use org.junit.BeforeClass. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Slf4jReporterTest.java    From flink with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setUp() {
	TestUtils.addTestAppenderForRootLogger();

	Configuration configuration = new Configuration();
	configuration.setString(MetricOptions.SCOPE_NAMING_TASK, "<host>.<tm_id>.<job_name>");

	registry = new MetricRegistryImpl(
		MetricRegistryConfiguration.fromConfiguration(configuration),
		Collections.singletonList(ReporterSetup.forReporter("slf4j", new Slf4jReporter())));
	delimiter = registry.getDelimiter();

	taskMetricGroup = new TaskManagerMetricGroup(registry, HOST_NAME, TASK_MANAGER_ID)
		.addTaskForJob(new JobID(), JOB_NAME, new JobVertexID(), new ExecutionAttemptID(), TASK_NAME, 0, 0);
	reporter = (Slf4jReporter) registry.getReporters().get(0);
}
 
Example #2
Source File: HadoopS3RecoverableWriterITCase.java    From flink with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void checkCredentialsAndSetup() throws IOException {
	// check whether credentials exist
	S3TestCredentials.assumeCredentialsAvailable();

	basePath = new Path(S3TestCredentials.getTestBucketUri() + "tests-" + UUID.randomUUID());

	// initialize configuration with valid credentials
	final Configuration conf = new Configuration();
	conf.setString("s3.access.key", S3TestCredentials.getS3AccessKey());
	conf.setString("s3.secret.key", S3TestCredentials.getS3SecretKey());

	conf.setLong(PART_UPLOAD_MIN_SIZE, PART_UPLOAD_MIN_SIZE_VALUE);
	conf.setInteger(MAX_CONCURRENT_UPLOADS, MAX_CONCURRENT_UPLOADS_VALUE);

	final String defaultTmpDir = TEMP_FOLDER.getRoot().getAbsolutePath() + "s3_tmp_dir";
	conf.setString(CoreOptions.TMP_DIRS, defaultTmpDir);

	FileSystem.initialize(conf);

	skipped = false;
}
 
Example #3
Source File: TestNcssParams.java    From tds with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@BeforeClass
public static void setUp() {
  ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
  validator = factory.getValidator();

  Class c = resolver.getClass();
  InputStream is = c.getResourceAsStream("/ValidationMessages.properties");
  if (is != null) {
    try {
      resolver.load(is);
      resolver.list(System.out);
      is.close();
    } catch (IOException e) {
      e.printStackTrace(); // To change body of catch statement use File | Settings | File Templates.
    }
  }
}
 
Example #4
Source File: BindKernelTest.java    From grcuda with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
@BeforeClass
public static void setupUpClass() throws IOException, InterruptedException {
    // Write CUDA C source file
    File sourceFile = tempFolder.newFile("inc_kernel.cu");
    PrintWriter writer = new PrintWriter(new FileWriter(sourceFile));
    writer.write(INCREMENT_KERNEL_SOURCE);
    writer.close();
    BindKernelTest.ptxFileName = sourceFile.getParent() + File.separator + "inc_kernel.ptx";

    // Compile source file with NVCC
    Process compiler = Runtime.getRuntime().exec("nvcc --ptx " +
                    sourceFile.getAbsolutePath() + " -o " + BindKernelTest.ptxFileName);
    BufferedReader output = new BufferedReader(new InputStreamReader(compiler.getErrorStream()));
    int nvccReturnCode = compiler.waitFor();
    output.lines().forEach(System.out::println);
    assertEquals(0, nvccReturnCode);
}
 
Example #5
Source File: ListTelnetHandlerTest.java    From dubbo-2.6.5 with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setUp() {
    StringBuilder buf = new StringBuilder();
    StringBuilder buf2 = new StringBuilder();
    Method[] methods = DemoService.class.getMethods();
    for (Method method : methods) {
        if (buf.length() > 0) {
            buf.append("\r\n");
        }
        if (buf2.length() > 0) {
            buf2.append("\r\n");
        }
        buf2.append(method.getName());
        buf.append(ReflectUtils.getName(method));
    }
    detailMethods = buf.toString();
    methodsName = buf2.toString();

    ProtocolUtils.closeAll();
}
 
Example #6
Source File: TestBase.java    From WeBASE-Front with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setUpBeforeClass() throws Exception {
  // 获取spring配置文件,生成上下文
  context = new ClassPathXmlApplicationContext("applicationContext.xml");
  //   ((ClassPathXmlApplicationContext) context).start();

  Service service = context.getBean(Service.class);
  service.run();

  System.out.println("start...");
  System.out.println("===================================================================");

  ChannelEthereumService channelEthereumService = new ChannelEthereumService();
  channelEthereumService.setChannelService(service);

  web3j = Web3j.build(channelEthereumService, service.getGroupId());
  // EthBlockNumber ethBlockNumber = web3.ethBlockNumber().send();

  Ok ok = Ok.deploy(web3j, credentials, new StaticGasProvider(gasPrice, gasLimit)).send();
  address = ok.getContractAddress();
  blockNumber = ok.getTransactionReceipt().get().getBlockNumber();
  blockHash = ok.getTransactionReceipt().get().getBlockHash();
  txHash = ok.getTransactionReceipt().get().getTransactionHash();
}
 
Example #7
Source File: BlockchainQueriesLogCacheTest.java    From besu with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setupClass() throws IOException {
  final Address testAddress = Address.fromHexString("0x123456");
  final Bytes testMessage = Bytes.fromHexString("0x9876");
  final Log testLog = new Log(testAddress, testMessage, List.of());
  testLogsBloomFilter = LogsBloomFilter.builder().insertLog(testLog).build();
  logsQuery = new LogsQuery(List.of(testAddress), List.of());

  for (int i = 0; i < 2; i++) {
    final RandomAccessFile file =
        new RandomAccessFile(cacheDir.newFile("logBloom-" + i + ".cache"), "rws");
    writeThreeEntries(testLogsBloomFilter, file);
    file.seek((BLOCKS_PER_BLOOM_CACHE - 3) * LogsBloomFilter.BYTE_SIZE);
    writeThreeEntries(testLogsBloomFilter, file);
  }
}
 
Example #8
Source File: HAQueryableStateRocksDBBackendITCase.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setup() throws Exception {
	zkServer = new TestingServer();

	// we have to manage this manually because we have to create the ZooKeeper server
	// ahead of this
	miniClusterResource = new MiniClusterWithClientResource(
		new MiniClusterResourceConfiguration.Builder()
			.setConfiguration(getConfig())
			.setNumberTaskManagers(NUM_TMS)
			.setNumberSlotsPerTaskManager(NUM_SLOTS_PER_TM)
			.build());

	miniClusterResource.before();

	client = new QueryableStateClient("localhost", QS_PROXY_PORT_RANGE_START);

	clusterClient = miniClusterResource.getClusterClient();
}
 
Example #9
Source File: MockRequestTestCase.java    From quarkus-http with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setup() throws ServletException {

    final PathHandler root = new PathHandler();
    final ServletContainer container = ServletContainer.Factory.newInstance();

    ServletInfo s = new ServletInfo("servlet", HelloServlet.class).addMapping("/aa");

    DeploymentInfo builder = new DeploymentInfo()
            .setClassLoader(MockRequestTestCase.class.getClassLoader())
            .setContextPath("/servletContext")
            .setClassIntrospecter(TestClassIntrospector.INSTANCE)
            .setDeploymentName("servletContext.war")
            .addServlet(s);

    DeploymentManager manager = container.addDeployment(builder);
    manager.deploy();
    deployment = manager.getDeployment();
    root.addPrefixPath(builder.getContextPath(), manager.start());

    DefaultServer.setRootHandler(root);
}
 
Example #10
Source File: NFilePruningTest.java    From kylin-on-parquet-v2 with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void beforeClass() {

    if (Shell.MAC)
        System.setProperty("org.xerial.snappy.lib.name", "libsnappyjava.jnilib");//for snappy

    sparkConf = new SparkConf().setAppName(UUID.randomUUID().toString()).setMaster("local[4]");
    sparkConf.set("spark.serializer", "org.apache.spark.serializer.JavaSerializer");
    sparkConf.set(StaticSQLConf.CATALOG_IMPLEMENTATION().key(), "in-memory");
    sparkConf.set("spark.sql.shuffle.partitions", "1");
    sparkConf.set("spark.memory.fraction", "0.1");
    // opt memory
    sparkConf.set("spark.shuffle.detectCorrupt", "false");
    // For sinai_poc/query03, enable implicit cross join conversion
    sparkConf.set("spark.sql.crossJoin.enabled", "true");

    ss = SparkSession.builder().config(sparkConf).getOrCreate();
    KylinSparkEnv.setSparkSession(ss);
    UdfManager.create(ss);

    System.out.println("Check spark sql config [spark.sql.catalogImplementation = "
            + ss.conf().get("spark.sql.catalogImplementation") + "]");
}
 
Example #11
Source File: GracefulShutdownTestCase.java    From quarkus-http with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setup() {

    shutdown = Handlers.gracefulShutdown(new HttpHandler() {
        @Override
        public void handleRequest(HttpServerExchange exchange) throws Exception {
            final CountDownLatch countDownLatch = latch2.get();
            final CountDownLatch latch = latch1.get();
            if (latch != null) {
                latch.countDown();
            }
            if (countDownLatch != null) {
                countDownLatch.await();
            }
        }
    });
    DefaultServer.setRootHandler(shutdown);
}
 
Example #12
Source File: ResponseWriterTestCase.java    From quarkus-http with Apache License 2.0 6 votes vote down vote up
@BeforeClass
public static void setup() throws ServletException {
    final PathHandler root = new PathHandler();
    final ServletContainer container = ServletContainer.Factory.newInstance();

    DeploymentInfo builder = new DeploymentInfo()
            .setClassIntrospecter(TestClassIntrospector.INSTANCE)
            .setClassLoader(ResponseWriterTestCase.class.getClassLoader())
            .setContextPath("/servletContext")
            .setDeploymentName("servletContext.war")
            .addServlet(Servlets.servlet("resp", ResponseWriterServlet.class)
                    .addMapping("/resp"))
            .addServlet(Servlets.servlet("respLArget", LargeResponseWriterServlet.class)
                    .addMapping("/large"));

    DeploymentManager manager = container.addDeployment(builder);
    manager.deploy();
    root.addPrefixPath(builder.getContextPath(), manager.start());
    DefaultServer.setRootHandler(root);
}
 
Example #13
Source File: GattConnectionTests.java    From bitgatt with Mozilla Public License 2.0 6 votes vote down vote up
@BeforeClass
public static void beforeClass() {
    Context appContext = mock(Context.class);
    when(appContext.getSystemService(any(String.class))).thenReturn(null);
    when(appContext.getApplicationContext()).thenReturn(appContext);
    FitbitGatt.getInstance().setAsyncOperationThreadWatchdog(mock(LooperWatchdog.class));
    FitbitGatt.getInstance().start(appContext);
    Looper mockLooper = mock(Looper.class);
    BluetoothDevice mockBluetoothDevice = mock(BluetoothDevice.class);
    when(mockBluetoothDevice.getAddress()).thenReturn(MOCK_ADDRESS);
    when(mockBluetoothDevice.getName()).thenReturn(MOCK_NAME);
    mockGatt = mock(BluetoothGatt.class);
    when(mockGatt.getDevice()).thenReturn(mockBluetoothDevice);
    connection = new GattConnection(new FitbitBluetoothDevice(mockBluetoothDevice), mockLooper);
    connection.setMockMode(true);
    BluetoothGattServer server = mock(BluetoothGattServer.class);
    serverConnection = new GattServerConnection(server, mockLooper);
    serverConnection.setMockMode(true);
}
 
Example #14
Source File: ProtobufDescriptorMapTest.java    From stateful-functions with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setup() throws IOException {
  // Load the test file descriptor set
  InputStream descriptorStream =
      ProtobufDescriptorMap.class.getClassLoader().getResourceAsStream(TEST_DESCRIPTOR_NAME);
  FILE_DESCRIPTOR_SET = DescriptorProtos.FileDescriptorSet.parseFrom(descriptorStream);
}
 
Example #15
Source File: SecurityRedirectTestCase.java    From quarkus-http with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setup() throws ServletException {

    final PathHandler root = new PathHandler();
    final ServletContainer container = ServletContainer.Factory.newInstance();

    ServletIdentityManager identityManager = new ServletIdentityManager();
    identityManager.addUser("user1", "password1", "role1");

    DeploymentInfo builder = new DeploymentInfo()
            .setClassIntrospecter(TestClassIntrospector.INSTANCE)
            .setClassLoader(ServletPathMappingTestCase.class.getClassLoader())
            .setContextPath("/servletContext")
            .setDeploymentName("servletContext.war")
            .setResourceManager(new TestResourceLoader(SecurityRedirectTestCase.class))
            .addWelcomePages("index.html")
            .setIdentityManager(identityManager)
            .setLoginConfig(new LoginConfig("BASIC", "Test Realm"))
            .addSecurityConstraint(new SecurityConstraint()
                    .addRoleAllowed("role1")
                    .addWebResourceCollection(new WebResourceCollection()
                            .addUrlPatterns("/index.html", "/filterpath/*")));

    DeploymentManager manager = container.addDeployment(builder);
    manager.deploy();
    root.addPrefixPath(builder.getContextPath(), manager.start());
    DefaultServer.setRootHandler(root);
}
 
Example #16
Source File: HadoopOSSFileSystemITCase.java    From flink with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setup() throws IOException {
	OSSTestCredentials.assumeCredentialsAvailable();

	final Configuration conf = new Configuration();
	conf.setString("fs.oss.endpoint", OSSTestCredentials.getOSSEndpoint());
	conf.setString("fs.oss.accessKeyId", OSSTestCredentials.getOSSAccessKey());
	conf.setString("fs.oss.accessKeySecret", OSSTestCredentials.getOSSSecretKey());
	FileSystem.initialize(conf);
	basePath = new Path(OSSTestCredentials.getTestBucketUri() + TEST_DATA_DIR);
	fs = basePath.getFileSystem();
	deadline = 0;
}
 
Example #17
Source File: TestSecureContainerServer.java    From hadoop-ozone with Apache License 2.0 5 votes vote down vote up
@BeforeClass
static public void setup() throws Exception {
  DefaultMetricsSystem.setMiniClusterMode(true);
  CONF.set(HddsConfigKeys.HDDS_METADATA_DIR_NAME, TEST_DIR);
  CONF.setBoolean(OZONE_SECURITY_ENABLED_KEY, true);
  CONF.setBoolean(HDDS_BLOCK_TOKEN_ENABLED, true);
  caClient = new CertificateClientTestImpl(CONF);
}
 
Example #18
Source File: AkkaRpcActorOversizedResponseMessageTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setupClass() throws Exception {
	final Configuration configuration = new Configuration();
	configuration.setString(AkkaOptions.FRAMESIZE, FRAMESIZE + " b");

	rpcService1 = AkkaRpcServiceUtils.createRpcService("localhost", 0, configuration);
	rpcService2 = AkkaRpcServiceUtils.createRpcService("localhost", 0, configuration);
}
 
Example #19
Source File: BaseMapperTest.java    From mybatis-action with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() {
    try {
        Reader reader = Resources.getResourceAsReader("mybatis-config.xml");
        sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
        reader.close();
    } catch (IOException e) {
        e.printStackTrace();
    }
}
 
Example #20
Source File: InitializeInOrderTestCase.java    From quarkus-http with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setup() {
    DeploymentUtils.setupServlet(new ServletInfo("s1", FirstServlet.class)
            .setLoadOnStartup(1),
            new ServletInfo("s2", SecondServlet.class)
                    .setLoadOnStartup(2)
            ,new ServletInfo("s3", ThirdServlet.class)
            .setLoadOnStartup(3));
}
 
Example #21
Source File: DeployLocalMetaToRemoteTest.java    From kylin-on-parquet-v2 with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void beforeClass() throws Exception {
    logger.info("Adding to classpath: " + new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
    ClassUtil.addClasspath(new File(HBaseMetadataTestCase.SANDBOX_TEST_DATA).getAbsolutePath());
    System.setProperty(KylinConfig.KYLIN_CONF, HBaseMetadataTestCase.SANDBOX_TEST_DATA);
    if (StringUtils.isEmpty(System.getProperty("hdp.version"))) {
        throw new RuntimeException("No hdp.version set; Please set hdp.version in your jvm option, for example: -Dhdp.version=2.4.0.0-169");
    }
}
 
Example #22
Source File: TestGribCollectionsDense.java    From netcdf-java with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@BeforeClass
static public void before() {
  GribIosp.debugIndexOnlyCount = 0;
  GribCollectionImmutable.countGC = 0;
  PartitionCollectionImmutable.countPC = 0;
  RandomAccessFile.enableDefaultGlobalFileCache();
  RandomAccessFile.setDebugLeaks(true);
  Grib.setDebugFlags(new DebugFlagsImpl("Grib/indexOnly"));
  GribCdmIndex.setGribCollectionCache(new ucar.nc2.util.cache.FileCacheGuava("GribCollectionCacheGuava", 100));
  GribCdmIndex.gribCollectionCache.resetTracking();
}
 
Example #23
Source File: ConsumerProgressSubCommandTest.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws NoSuchFieldException, IllegalAccessException, InterruptedException, RemotingException, MQClientException, MQBrokerException {
    mQClientAPIImpl = mock(MQClientAPIImpl.class);
    defaultMQAdminExt = new DefaultMQAdminExt();
    defaultMQAdminExtImpl = new DefaultMQAdminExtImpl(defaultMQAdminExt, 1000);

    Field field = DefaultMQAdminExtImpl.class.getDeclaredField("mqClientInstance");
    field.setAccessible(true);
    field.set(defaultMQAdminExtImpl, mqClientInstance);
    field = MQClientInstance.class.getDeclaredField("mQClientAPIImpl");
    field.setAccessible(true);
    field.set(mqClientInstance, mQClientAPIImpl);
    field = DefaultMQAdminExt.class.getDeclaredField("defaultMQAdminExtImpl");
    field.setAccessible(true);
    field.set(defaultMQAdminExt, defaultMQAdminExtImpl);

    TopicRouteData topicRouteData = new TopicRouteData();
    List<BrokerData> brokerDatas = new ArrayList<>();
    HashMap<Long, String> brokerAddrs = new HashMap<>();
    brokerAddrs.put(1234l, "127.0.0.1:10911");
    BrokerData brokerData = new BrokerData();
    brokerData.setCluster("default-cluster");
    brokerData.setBrokerName("default-broker");
    brokerData.setBrokerAddrs(brokerAddrs);
    brokerDatas.add(brokerData);
    topicRouteData.setBrokerDatas(brokerDatas);
    topicRouteData.setQueueDatas(new ArrayList<QueueData>());
    topicRouteData.setFilterServerTable(new HashMap<String, List<String>>());
    when(mQClientAPIImpl.getTopicRouteInfoFromNameServer(anyString(), anyLong())).thenReturn(topicRouteData);

    ConsumeStats consumeStats = new ConsumeStats();
    consumeStats.setConsumeTps(1234);
    MessageQueue messageQueue = new MessageQueue();
    OffsetWrapper offsetWrapper = new OffsetWrapper();
    HashMap<MessageQueue, OffsetWrapper> stats = new HashMap<>();
    stats.put(messageQueue, offsetWrapper);
    consumeStats.setOffsetTable(stats);
    when(mQClientAPIImpl.getConsumeStats(anyString(), anyString(), anyString(), anyLong())).thenReturn(consumeStats);
}
 
Example #24
Source File: NettezaValueMetaBaseTest.java    From hop with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setUpBeforeClass() throws HopException {
  PluginRegistry.addPluginType( ValueMetaPluginType.getInstance() );
  PluginRegistry.addPluginType( DatabasePluginType.getInstance() );
  PluginRegistry.init();
  HopLogStore.init();
}
 
Example #25
Source File: CalculatorBackwardCompatibilityUnitTest.java    From hop with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void init() throws HopException {
  assertEquals( DEFAULT_ROUND_2_MODE, getRound2Mode() );
  setRound2Mode( OBSOLETE_ROUND_2_MODE );
  assertEquals( OBSOLETE_ROUND_2_MODE, getRound2Mode() );

  HopEnvironment.init();
}
 
Example #26
Source File: TrafficControlIntegrationTest.java    From data-highway with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void before() throws Exception {
  kafka.createTopic(ROAD_TOPIC, 1, 1);
  kafka.createTopic(PATCH_TOPIC, 1, 1);

  int port;
  try (ServerSocket socket = new ServerSocket(0)) {
    port = socket.getLocalPort();
  }

  context = new SpringApplicationBuilder(TrafficControlApp.class)
      .bannerMode(OFF)
      .properties(
          ImmutableMap
              .<String, Object> builder()
              .put("server.port", Integer.toString(port))
              .put("kafka.default.replicationFactor", "1")
              .put("kafka.bootstrapServers", kafka.bootstrapServers())
              .put("kafka.zookeeper", kafka.zKConnectString())
              .put("kafka.road.topic", ROAD_TOPIC)
              .put("kafka.road.modification.topic", PATCH_TOPIC)
              .build())
      .build()
      .run();

  kafkaStore = new KafkaStore<>(kafka.bootstrapServers(), new StringJsonNodeSerializer(), ROAD_TOPIC);
}
 
Example #27
Source File: SpitterRepositoryTest.java    From Project with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void before() {
  SPITTERS[0] = new Spitter(1L, "habuma", "password", "Craig Walls",
      "[email protected]", false);
  SPITTERS[1] = new Spitter(2L, "mwalls", "password", "Michael Walls",
      "[email protected]", true);
  SPITTERS[2] = new Spitter(3L, "chuck", "password", "Chuck Wagon",
      "[email protected]", false);
  SPITTERS[3] = new Spitter(4L, "artnames", "password", "Art Names",
      "[email protected]", true);
  SPITTERS[4] = new Spitter(5L, "newbee", "letmein", "New Bee",
      "[email protected]", true);
  SPITTERS[5] = new Spitter(4L, "arthur", "letmein", "Arthur Names",
      "[email protected]", false);
}
 
Example #28
Source File: CallBuilderTest.java    From das with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void setupDataBase() throws SQLException {
    dao = DasClientFactory.getClient(DATABASE_LOGIC_NAME);
    String[] sqls = new String[]{
            DROP_SP_WITHOUT_OUT_PARAM, CREATE_SP_WITHOUT_OUT_PARAM,
            DROP_SP_WITH_OUT_PARAM, CREATE_SP_WITH_OUT_PARAM,
            DROP_SP_WITH_IN_OUT_PARAM, CREATE_SP_WITH_IN_OUT_PARAM,
            DROP_SP_WITH_INTERMEDIATE_RESULT, CREATE_SP_WITH_INTERMEDIATE_RESULT};
    BatchUpdateBuilder b = new BatchUpdateBuilder(sqls);
    b.hints().inShard(0);
    dao.batchUpdate(b);
    b.hints().inShard(1);
    dao.batchUpdate(b);
}
 
Example #29
Source File: HardCodedProfileValueSourceSpringRunnerTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@BeforeClass
public static void setProfileValue() {
	numTestsExecuted = 0;
	// Set the system property to something other than VALUE as a sanity
	// check.
	System.setProperty(NAME, "999999999999");
}
 
Example #30
Source File: WorkflowActionSNMPTrapTest.java    From hop with Apache License 2.0 5 votes vote down vote up
@BeforeClass
public static void beforeClass() throws HopException {
  PluginRegistry.addPluginType( TwoWayPasswordEncoderPluginType.getInstance() );
  PluginRegistry.init();
  String passwordEncoderPluginID =
    Const.NVL( EnvUtil.getSystemProperty( Const.HOP_PASSWORD_ENCODER_PLUGIN ), "Hop" );
  Encr.init( passwordEncoderPluginID );
}