<commit_before>/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2002-2009, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.arcsde;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Logger;

import javax.naming.InitialContext;
import javax.naming.NamingException;

import org.geotools.arcsde.data.ArcSDEDataStore;
import org.geotools.arcsde.data.TestData;
import org.geotools.arcsde.session.ISession;
import org.geotools.arcsde.session.ISessionPool;
import org.geotools.data.DataAccessFactory;
import org.geotools.data.DataAccessFactory.Param;
import org.geotools.data.DataAccessFinder;
import org.geotools.data.DataStoreFactorySpi;
import org.geotools.data.DataStoreFinder;
import org.geotools.data.Transaction;
import org.geotools.factory.GeoTools;
import org.geotools.util.logging.Logging;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

/**
 * @author <NAME> (OpenGeo)
 * 
 *
 *
 * @source $URL$
 *         http://svn.osgeo.org/geotools/trunk/modules/plugin/arcsde/datastore/src/test/java/org
 *         /geotools/arcsde/ArcSDEJNDIDataStoreFactoryTest.java $
 * @version $Id$
 * @since 2.5.7
 */
public class ArcSDEJNDIDataStoreFactoryTest {

    private static final Logger LOGGER = Logging.getLogger("org.geotools.arcsde");

    private static ArcSDEJNDIDataStoreFactory factory;

    private static TestData testData;

    /**
     * @throws java.lang.Exception
     */
    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        factory = new ArcSDEJNDIDataStoreFactory();
        setupJNDIEnvironment();
        testData = new TestData();
        testData.setUp();
        testData.getConProps();
    }
<commit_msg>Make sure to clean up the JNDI context before leaving the VM<commit_after>/*
 *    GeoTools - The Open Source Java GIS Toolkit
 *    http://geotools.org
 *
 *    (C) 2002-2009, Open Source Geospatial Foundation (OSGeo)
 *
 *    This library is free software; you can redistribute it and/or
 *    modify it under the terms of the GNU Lesser General Public
 *    License as published by the Free Software Foundation;
 *    version 2.1 of the License.
 *
 *    This library is distributed in the hope that it will be useful,
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *    Lesser General Public License for more details.
 */
package org.geotools.arcsde;

import static org.junit.Assert.*;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.logging.Logger;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import org.geotools.arcsde.data.ArcSDEDataStore;
import org.geotools.arcsde.data.TestData;
import org.geotools.arcsde.session.ISession;
import org.geotools.arcsde.session.ISessionPool;
import org.geotools.data.DataAccessFactory;
import org.geotools.data.DataAccessFactory.Param;
import org.geotools.data.DataAccessFinder;
import org.geotools.data.DataStoreFactorySpi;
import org.geotools.data.DataStoreFinder;
import org.geotools.data.Transaction;
import org.geotools.factory.GeoTools;
import org.geotools.util.logging.Logging;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

/**
 * @author <NAME> (OpenGeo)
 * 
 *
 *
 * @source $URL$
 *         http://svn.osgeo.org/geotools/trunk/modules/plugin/arcsde/datastore/src/test/java/org
 *         /geotools/arcsde/ArcSDEJNDIDataStoreFactoryTest.java $
 * @version $Id$
 * @since 2.5.7
 */
public class ArcSDEJNDIDataStoreFactoryTest {

    private static final Logger LOGGER = Logging.getLogger("org.geotools.arcsde");

    private static ArcSDEJNDIDataStoreFactory factory;

    private static TestData testData;

    /**
     * @throws java.lang.Exception
     */
    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        factory = new ArcSDEJNDIDataStoreFactory();
        setupJNDIEnvironment();
        testData = new TestData();
        testData.setUp();
        testData.getConProps();
    }

    @AfterClass
    public static void cleanupAfterClass() throws Exception {
        // clean up the context, otherwise other tests in other JNDI tests might fail
        // as a consequence
        Context ctx = GeoTools.getInitialContext(GeoTools.getDefaultHints());
        ctx.close();
    }

{'fraction_non_alphanumeric': 0.09438822447102116, 'fraction_numerical': 0.004783808647654094, 'mean_word_length': 3.768421052631579, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7595326', 'n_tokens_mistral': 1693, 'n_tokens_neox': 1676, 'n_words': 433}