blob: 0c89f8d82233e42e35d07f4779d124fd86f4cb37 [file] [log] [blame]
/*
* Copyright 2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.jdo.test;
import org.apache.jdo.pc.LargeObjFactory;
import org.apache.jdo.test.util.Factory;
import org.apache.jdo.test.util.JDORITestRunner;
/**
* Tests that we can insert a large object. Size is optionally given as
* system property; default is 100,000 integers in an array.
* To test that we can fetch the object(s), use Test_FetchExisting.
*
* @author Dave Bristor
*/
public class Test_LargeObj extends Test_Insert {
/** */
private static int size = Integer.getInteger("size", 100000).intValue();
/** */
public static void main(String args[]) {
JDORITestRunner.run(Test_LargeObj.class);
}
/** */
public void test() throws Exception
{
if (debug) logger.debug("Test_LargeObj size: " + size);
insertObjects();
checkExtent(factory.getPCClass(), numInsert);
writeOIDs();
}
/** */
protected Factory getFactory(int verify) {
return new LargeObjFactory(size);
}
}