Package org.apache.derbyTesting.junit

Examples of org.apache.derbyTesting.junit.DerbyVersion


        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

            throw new IllegalStateException("only running off jars is " +
                    "supported, currently running off " + libDir);
        }
        // Get the directory the JAR file is living in.
        libDir = libDir.getParentFile();
        DerbyVersion version = DerbyVersion.parseVersionString(
                sysinfo.getVersionString());
        DerbyDistribution dist = DerbyDistribution.getInstance(libDir, version);
        if (dist == null) {
            throw new IllegalStateException(
                    "failed to get running distribution (programming error?)");
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

        assertEquals(0, _10_8.getPoint());
        assertEquals(9, _11_9.getPoint());
    }

    public void testCreateGet() {
        DerbyVersion v = new DerbyVersion(1, 2, 3, 4);
        assertEquals(1, v.getMajor());
        assertEquals(2, v.getMinor());
        assertEquals(3, v.getFixpack());
        assertEquals(4, v.getPoint());
    }
View Full Code Here

        assertFalse(_11_0.equals(_10_8));
        assertFalse(_10_5_2_0.equals(_10_5_3_0));
    }

    public void testParseString() {
        DerbyVersion dv = DerbyVersion.parseVersionString(
                "10.9.0.0 alpha - (1180861M)");
        assertTrue(dv.equals(_10_9));
        assertEquals(0, dv.compareTo(_10_9));

        dv = DerbyVersion.parseVersionString("10.8.1.2");
        assertTrue(dv.equals(_10_8_1_2));
        assertEquals(0, dv.compareTo(_10_8_1_2));
       
        dv = DerbyVersion.parseVersionString("   10.8.1.2   ");
        assertTrue(dv.equals(_10_8_1_2));
        assertEquals(0, dv.compareTo(_10_8_1_2));

        try {
            dv = DerbyVersion.parseVersionString("10.8.1");
            fail("should have failed");
        } catch (IllegalArgumentException iae) {
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

        }
    }

    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

        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;
            }

            BaseTestSuite clientSuites = new BaseTestSuite(
                    "Client runs against server " + serverVersion.toString());
            for (DerbyDistribution client : dists) {
                if (limitToTrunk && !server.equals(newestDist) &&
                        !client.equals(newestDist)) {
                    continue;
                }
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.