Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.DerbyVersion


                TestConfiguration.getReleaseRepository().getDistributions();
        List<DerbyDistribution> qualifiedDists =
                new ArrayList<DerbyDistribution>();
        for (DerbyDistribution dist: dists) {
            // Handle includes and excludes.
            DerbyVersion version = dist.getVersion();
            if (!toInclude.isEmpty() && !toInclude.contains(version)) {
                println(version.toString() + " not in include list");
                continue;
            }
            if (!toExclude.isEmpty() && toExclude.contains(version)) {
                println(version.toString() + " in exclude list");
                continue;
            }

            qualifiedDists.add(dist);
        }
View Full Code Here


            // its stack trace is not printed by default in this context.
            throw new IllegalStateException(
                    "missing Derby class: " + cnfe.getMessage(), cnfe);
        }
        File testingDir = getJarDirectoryOf(getClass());
        DerbyVersion version = DerbyVersion.parseVersionString(
                sysinfo.getVersionString());
        DerbyDistribution dist = DerbyDistribution.newInstance(
                                                version, libDir, testingDir);
        if (dist == null) {
            throw new IllegalStateException(
View Full Code Here

        DerbyDistribution prev = null;
        if (newestFixpackOnly) {
            List<DerbyDistribution> filtered =
                    new ArrayList<DerbyDistribution>();
            for (DerbyDistribution d : distributions) {
                DerbyVersion ver = d.getVersion();
                if (prev == null || prev.getVersion().greaterMinorThan(ver)) {
                    filtered.add(d);
                } else {
                    println("ignored " + ver.toString() +
                            ", not the newest fixpack version for " +
                            ver.getMajor() + "." + ver.getMinor());
                }
                prev = d;
            }
            distributions = filtered;
        }
View Full Code Here

        List<DerbyDistribution> dists = filterVersions();
        DerbyDistribution newestDist = dists.get(0);
        String newestTestingCode = newestDist.getTestingClasspath();
        // Generate a list of all the combinations.
        for (DerbyDistribution server : dists) {
            DerbyVersion serverVersion = server.getVersion();

            // Check if testing of this server version should be skipped.
            if (skipServerVersion(serverVersion)) {
                continue;
            }

            TestSuite clientSuites = new TestSuite(
                    "Client runs against server " + serverVersion.toString());
            for (DerbyDistribution client : dists) {
                if (limitToTrunk && !server.equals(newestDist) &&
                        !client.equals(newestDist)) {
                    continue;
                }
View Full Code Here

                TestConfiguration.getReleaseRepository().getDistributions();
        List<DerbyDistribution> qualifiedDists =
                new ArrayList<DerbyDistribution>();
        for (DerbyDistribution dist: dists) {
            // Handle includes and excludes.
            DerbyVersion version = dist.getVersion();
            if (!toInclude.isEmpty() && !toInclude.contains(version)) {
                println(version.toString() + " not in include list");
                continue;
            }
            if (!toExclude.isEmpty() && toExclude.contains(version)) {
                println(version.toString() + " in exclude list");
                continue;
            }

            qualifiedDists.add(dist);
        }
View Full Code Here

            // its stack trace is not printed by default in this context.
            throw new IllegalStateException(
                    "missing Derby class: " + cnfe.getMessage(), cnfe);
        }
        File testingDir = getJarDirectoryOf(getClass());
        DerbyVersion version = DerbyVersion.parseVersionString(
                sysinfo.getVersionString());
        DerbyDistribution dist = DerbyDistribution.newInstance(
                                                version, libDir, testingDir);
        if (dist == null) {
            throw new IllegalStateException(
View Full Code Here

        DerbyDistribution prev = null;
        if (newestFixpackOnly) {
            List<DerbyDistribution> filtered =
                    new ArrayList<DerbyDistribution>();
            for (DerbyDistribution d : distributions) {
                DerbyVersion ver = d.getVersion();
                if (prev == null || prev.getVersion().greaterMinorThan(ver)) {
                    filtered.add(d);
                } else {
                    println("ignored " + ver.toString() +
                            ", not the newest fixpack version for " +
                            ver.getMajor() + "." + ver.getMinor());
                }
                prev = d;
            }
            distributions = filtered;
        }
View Full Code Here

        }
    }

    public void testVerifyVersions()
            throws SQLException {
        DerbyVersion server = getServerVersion();
        DerbyVersion client = getDriverVersion();
        println("server=" + server.toString() + " <-> client=" +
                client.toString());
        String expS = getSystemProperty("derby.tests.compat.expectedServer");
        String expC = getSystemProperty("derby.tests.compat.expectedClient");
        assertNotNull("expected server property missing", expS);
        assertNotNull("expected client property missing", expC);
        DerbyVersion expectedServer = DerbyVersion.parseVersionString(expS);
        DerbyVersion expectedClient = DerbyVersion.parseVersionString(expC);
        assertEquals("server version mismatch", expectedServer, server);
        assertEquals("client version mismatch", expectedClient, client);
    }
View Full Code Here

    }

    // return true if the client supports this datatype
    private    boolean    clientSupports( TypeDescriptor type )
            throws SQLException {
        DerbyVersion firstSupportedVersion = type.getDerbyVersion();

        if ( firstSupportedVersion == null ) { return false; }
        else { return getDriverVersion().atLeast( firstSupportedVersion ); }
    }
View Full Code Here

     * Returns a {@code DerbyVersion} object describing the old version.
     *
     * @return A version object.
     */
    final DerbyVersion getOldVersion() {
        return new DerbyVersion(
                getOldMajor(), getOldMinor(), getOldFixPack(), getOldPoint());
    }
View Full Code Here

TOP

Related Classes of org.apache.derbyTesting.junit.DerbyVersion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.