Search in sources :

Example 41 with BeforeClass

use of org.junit.BeforeClass in project glusterfs-hadoop by gluster.

the class HcfsUmaskTest method setup.

@BeforeClass
public static void setup() throws Exception {
    HcfsTestConnectorInterface connector = HcfsTestConnectorFactory.getHcfsTestConnector();
    fs = connector.create();
}
Also used : HcfsTestConnectorInterface(org.apache.hadoop.fs.test.connector.HcfsTestConnectorInterface) BeforeClass(org.junit.BeforeClass)

Example 42 with BeforeClass

use of org.junit.BeforeClass in project glusterfs-hadoop by gluster.

the class GlusterMultipleVolumeTest method setup.

@BeforeClass
public static void setup() throws Exception {
    HcfsTestConnectorInterface connector = HcfsTestConnectorFactory.getHcfsTestConnector();
    config = connector.createConfiguration();
}
Also used : HcfsTestConnectorInterface(org.apache.hadoop.fs.test.connector.HcfsTestConnectorInterface) BeforeClass(org.junit.BeforeClass)

Example 43 with BeforeClass

use of org.junit.BeforeClass in project glusterfs-hadoop by gluster.

the class HCFSPerformanceIOTests method setup.

@BeforeClass
public static void setup() throws Exception {
    HcfsTestConnectorInterface connector = HcfsTestConnectorFactory.getHcfsTestConnector();
    fs = connector.create();
}
Also used : HcfsTestConnectorInterface(org.apache.hadoop.fs.test.connector.HcfsTestConnectorInterface) BeforeClass(org.junit.BeforeClass)

Example 44 with BeforeClass

use of org.junit.BeforeClass in project glusterfs-hadoop by gluster.

the class HcfsFileSystemTest method setup.

@BeforeClass
public static void setup() throws Exception {
    HcfsTestConnectorInterface connector = HcfsTestConnectorFactory.getHcfsTestConnector();
    fs = connector.create();
}
Also used : HcfsTestConnectorInterface(org.apache.hadoop.fs.test.connector.HcfsTestConnectorInterface) BeforeClass(org.junit.BeforeClass)

Example 45 with BeforeClass

use of org.junit.BeforeClass in project gitblit by gitblit.

the class LdapBasedUnitTest method ldapInit.

/**
	 * Create three different in memory DS.
	 *
	 * Each DS has a different configuration:
	 * The first allows anonymous binds.
	 * The second requires authentication for all operations. It will only allow the DIRECTORY_MANAGER account
	 * to search for users and groups.
	 * The third one is like the second, but it allows users to search for users and groups, and restricts the
	 * USER_MANAGER from searching for groups.
	 */
@BeforeClass
public static void ldapInit() throws Exception {
    InMemoryDirectoryServer ds;
    InMemoryDirectoryServerConfig config = createInMemoryLdapServerConfig(AuthMode.ANONYMOUS);
    config.setListenerConfigs(InMemoryListenerConfig.createLDAPConfig("anonymous"));
    ds = createInMemoryLdapServer(config);
    AuthMode.ANONYMOUS.setDS(ds);
    AuthMode.ANONYMOUS.setLdapPort(ds.getListenPort("anonymous"));
    config = createInMemoryLdapServerConfig(AuthMode.DS_MANAGER);
    config.setListenerConfigs(InMemoryListenerConfig.createLDAPConfig("ds_manager"));
    config.setAuthenticationRequiredOperationTypes(EnumSet.allOf(OperationType.class));
    ds = createInMemoryLdapServer(config);
    AuthMode.DS_MANAGER.setDS(ds);
    AuthMode.DS_MANAGER.setLdapPort(ds.getListenPort("ds_manager"));
    config = createInMemoryLdapServerConfig(AuthMode.USR_MANAGER);
    config.setListenerConfigs(InMemoryListenerConfig.createLDAPConfig("usr_manager"));
    config.setAuthenticationRequiredOperationTypes(EnumSet.allOf(OperationType.class));
    ds = createInMemoryLdapServer(config);
    AuthMode.USR_MANAGER.setDS(ds);
    AuthMode.USR_MANAGER.setLdapPort(ds.getListenPort("usr_manager"));
}
Also used : InMemoryDirectoryServer(com.unboundid.ldap.listener.InMemoryDirectoryServer) InMemoryDirectoryServerConfig(com.unboundid.ldap.listener.InMemoryDirectoryServerConfig) OperationType(com.unboundid.ldap.sdk.OperationType) BeforeClass(org.junit.BeforeClass)

Aggregations

BeforeClass (org.junit.BeforeClass)2813 File (java.io.File)388 Configuration (org.apache.hadoop.conf.Configuration)287 IOException (java.io.IOException)128 Connection (java.sql.Connection)126 Properties (java.util.Properties)108 Reader (java.io.Reader)99 SqlSessionFactoryBuilder (org.apache.ibatis.session.SqlSessionFactoryBuilder)98 Provisioning (com.zimbra.cs.account.Provisioning)93 ScriptRunner (org.apache.ibatis.jdbc.ScriptRunner)91 HiveConf (org.apache.hadoop.hive.conf.HiveConf)86 MockProvisioning (com.zimbra.cs.account.MockProvisioning)77 Path (org.apache.hadoop.fs.Path)75 URI (java.net.URI)73 HashMap (java.util.HashMap)70 URL (java.net.URL)63 SqlSession (org.apache.ibatis.session.SqlSession)62 MiniDFSCluster (org.apache.hadoop.hdfs.MiniDFSCluster)61 Injector (com.google.inject.Injector)57 CConfiguration (co.cask.cdap.common.conf.CConfiguration)56