@@ -0,0 +1,2221 @@
+/*%0A *  Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  you may not use this file except in compliance with the License.%0A *  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software%0A *  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  See the License for the specific language governing permissions and%0A *  limitations under the License.%0A *%0A */%0Apackage dk.statsbiblioteket.summa.storage.database;%0A%0Aimport dk.statsbiblioteket.summa.common.configuration.Configuration;%0Aimport dk.statsbiblioteket.summa.storage.api.Storage;%0Aimport dk.statsbiblioteket.summa.storage.database.h2.H2Storage;%0Aimport junit.framework.TestCase;%0Aimport org.apache.commons.logging.LogFactory;%0Aimport org.apache.commons.logging.Log;%0Aimport sun.security.krb5.Config;%0A%0Aimport java.io.IOException;%0A%0A/**%0A * Not a unit test. Used for debugging performance problems with H2 and relies on a local copy of a production%0A * base being present.%0A */%0Apublic class H2StorageDebugTest extends TestCase %7B%0A    private static Log log = LogFactory.getLog(H2StorageDebugTest.class);%0A%0A    public static final String storageFolder = %22/home/te/projects/summa/doms/%22;%0A%0A    public void testPeek() throws IOException %7B%0A        H2Storage storage = getStorage();%0A        if (storage == null) %7B%0A            log.info(%22Unable to run debugging %5C%22unit test%5C%22 as the expected H2 folder is not present: %22 + storageFolder);%0A            return;%0A        %7D%0A%0A        try %7B%0A            System.out.println(%22******************%22 + storage.getStats());%0A        %7D finally %7B%0A            storage.close();%0A        %7D%0A    %7D%0A%0A    private H2Storage getStorage() throws IOException %7B%0A        Configuration conf = Configuration.newMemoryBased(%0A                Storage.CONF_CLASS, H2Storage.class,%0A                DatabaseStorage.CONF_LOCATION, storageFolder,%0A                H2Storage.CONF_H2_SERVER_PORT, 9317,%0A                DatabaseStorage.CONF_FORCENEW, false,%0A                DatabaseStorage.CONF_CREATENEW, false%0A        );%0A        return new H2Storage(conf);%0A    %7D%0A%0A%0A%7D%0A

Add debug not-unit test for H2