Re: What version of JUnit, again? - Mailing list pgsql-jdbc
From | Dave Cramer |
---|---|
Subject | Re: What version of JUnit, again? |
Date | |
Msg-id | CADK3HHJG3UJQFU1zHxNiCgjVRDbhZ5Ydqopbn20xm9y2D-MWAg@mail.gmail.com Whole thread Raw |
In response to | Re: What version of JUnit, again? (David Ventimiglia <dventimi@gmail.com>) |
Responses |
Re: What version of JUnit, again?
|
List | pgsql-jdbc |
Is junit on the classpath ?
On 3 August 2014 20:15, David Ventimiglia <dventimi@gmail.com> wrote:
You bet. They're in the attached errors.txt file and also pasted in below.
Buildfile: /home/dventimi/work/pgjdbc/build.xml
prepare:
check_versions:
check_driver:
driver:
compile:
[javac] /home/dventimi/work/pgjdbc/build.xml:243: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
artifact-version:
[echo] Artifact version string: postgresql-9.4-1200.jdbc41
jar:
testjar:
[mkdir] Created dir: /home/dventimi/work/pgjdbc/build/tests
[javac] /home/dventimi/work/pgjdbc/build.xml:451: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 84 source files to /home/dventimi/work/pgjdbc/build/tests
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:3: error: package org.junit does not exist
[javac] import org.junit.Assert;
[javac] ^
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:4: error: package org.junit does not exist
[javac] import org.junit.Test;
[javac] ^
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:5: error: package org.junit does not exist
[javac] import org.junit.Before;
[javac] ^
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:6: error: package org.junit does not exist
[javac] import org.junit.BeforeClass;
[javac] ^
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:7: error: package org.junit.runners does not exist
[javac] import org.junit.runners.Parameterized;
[javac] ^
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:8: error: package org.junit.runners.Parameterized does not exist
[javac] import org.junit.runners.Parameterized.Parameters;
[javac] ^
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:9: error: package org.junit.runner does not exist
[javac] import org.junit.runner.RunWith;
[javac] ^
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:23: error: cannot find symbol
[javac] @RunWith(Parameterized.class)
[javac] ^
[javac] symbol: class RunWith
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:42: error: cannot find symbol
[javac] @Parameters
[javac] ^
[javac] symbol: class Parameters
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:181: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:203: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:213: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:223: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:240: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:257: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:274: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:307: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:327: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:351: error: cannot find symbol
[javac] @Test
[javac] ^
[javac] symbol: class Test
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:141: error: cannot find symbol
[javac] Assert.assertEquals(1, rs.getInt(1));
[javac] ^
[javac] symbol: variable Assert
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:147: error: cannot find symbol
[javac] Assert.assertEquals(sslExpected, sslActual);
[javac] ^
[javac] symbol: variable Assert
[javac] location: class SingleCertValidatingFactoryTest
[javac] /home/dventimi/work/pgjdbc/org/postgresql/test/ssl/SingleCertValidatingFactoryTest.java:172: error: cannot find symbol
[javac] Assert.fail("Expected exception " + expectedThrowable.getName() + " but it did not occur.");
[javac] ^
[javac] symbol: variable Assert
[javac] location: class SingleCertValidatingFactoryTest
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 22 errors
BUILD FAILED
/home/dventimi/work/pgjdbc/build.xml:451: Compile failed; see the compiler error output for details.
Total time: 12 secondsOn Sun, Aug 3, 2014 at 5:07 PM, Dave Cramer <pg@fastcrypt.com> wrote:Pretty sure I use 3.8.2Can you provide me with the errors you are getting ?On 3 August 2014 16:53, David Ventimiglia <dventimi@gmail.com> wrote:Presumably, this is why running `ant test' in pgjdbc fails for me with compilation errors. I confess, I'm not an expert with Ant and Maven, so maybe I've done something wrong. But, exactly waht version of JUnit should I be using? Thanks!On the other hand, the pgjdbc Ant build.xml file specifies JUnit 3.8.2.:An example of such a test is SingleCertValidatingFactoryTest.java in pgjdbc/org/postgresql/test/ssl directory (presumably other tests are like this).Hi,But, there's a big between JUnit 3.8 and earlier and JUnit 4. The former has components in packages junit.framework while the latter has components in org.junit and so test that directly import on or the other of those packages are sensitive to the version of JUnit you're using.
I'm a little confused as to what version of JUnit I'm supposed to be using in order to build/test the Postgresql JDBC driver. This page says that "JUnit at least 3.7 is needed."
http://jdbc.postgresql.org/development/development.html
<artifact:dependencies pathId="dependency.classpath" useScope="test">
<dependency groupId="junit" artifactId="junit" version="3.8.2" scope="test"/>
</artifact:dependencies>
Best,
David Ventimiglia
pgsql-jdbc by date: