Commit 62e249c9 authored by mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar mevenson@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Broaden Java-side test coverage to compile everything under `test/src'.

Tests are still explicitly chosen via the nested <arg> to the
'//abcl.test.java/java@' element at build.xml:940 ff.

The test in org.armedbear.lisp.util.HttpHeadTest currently hangs (!)
the executing VM, a high priority item for abcl-1.3.0.  The problem
lies in a hanging read in the JVM system classes that previously
didn't exist when accessing the ZipCache.get(url) API for the second
time.

Users are advised to call SYSTEM:DISABLE-ZIP-CACHE until this behavior
is fixed.
parent b5468365
......@@ -860,13 +860,13 @@ The following Ant targets run various test suites:
abcl.test
-- Run all available tests.
abcl.test.java
-- Run the ABCL junit Java tests under ${basedir}/test/src
-- Run the ABCL junit Java tests under ${basedir}/test/src/
abcl.test.lisp
-- Run the 'test.ansi.compiled', 'test.abcl', 'test.cl-bench' targets
test.ansi.compiled
-- Run the compiled version of the ANSI test suite
test.abcl
-- Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl
-- Run the Lisp RT tests collected in ${basedir}/test/lisp/abcl/
test.cl-bench
-- Run the cl-bench test suite.
......@@ -889,9 +889,7 @@ ${basedir}/../cl-bench
value="${basedir}/test/src"/>
<patternset id="abcl.test.source.java">
<!-- For now, we list tests explicitly, because we have to
enumerate them later to the JUnit test runner. -->
<include name="org/armedbear/lisp/*.java"/>
<include name="org/armedbear/lisp/**/*.java"/>
</patternset>
<property name="junit.path"
......@@ -946,6 +944,9 @@ ${basedir}/../cl-bench
<arg value="org.armedbear.lisp.PathnameTest"/>
<arg value="org.armedbear.lisp.StreamTest"/>
<arg value="org.armedbear.lisp.UtilitiesTest"/>
<!-- currently hangs(!) the running process
<arg value="org.armedbear.lisp.util.HttpHeadTest"/>
-->
</java>
</target>
......
......@@ -202,10 +202,11 @@ Returns the two values of the pathnames of the created archives."
t)
(defparameter *url-jar-pathname-base*
"jar:http://abcl-dynamic-install.googlecode.com/files/baz-20130403a.jar!/")
"jar:http://abcl.org/fasl/42/baz-20140105a-fasl-42.jar!/")
;; fasl 41 "jar:http://abcl-dynamic-install.googlecode.com/files/baz-20130403a.jar!/")
(defmacro load-url-relative (path)
`(load (format nil "~A~A" *url-jar-pathname-base* ,path)))
`(load (probe-file (format nil "~A~A" *url-jar-pathname-base* ,path))))
;;; wrapped in PROGN for easy disabling without a network connection
;;; XXX come up with a better abstraction
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org.armedbear.lisp.util;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
*
* @author evenson
*/
public class HttpHeadTest {
public HttpHeadTest() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Test of get method, of class HttpHead.
*/
@Test
public void testGet() {
System.out.println("get");
URL url = null;
try {
url = new URL("http://abcl-dynamic-install.googlecode.com/files/baz-20130403a.jar");
} catch (MalformedURLException ex) {
Logger.getLogger(HttpHeadTest.class.getName()).log(Level.SEVERE, null, ex);
}
String key = "Last-Modified";
String expResult = "";
String result = HttpHead.get(url, key);
assertEquals(expResult, result);
System.out.println("Last-Modifed result was "+ result);
fail("The test case is a prototype.");
}
/**
* Test of main method, of class HttpHead.
*/
@Test
public void testMain() {
System.out.println("main");
String[] argv = null;
HttpHead.main(argv);
// TODO review the generated test code and remove the default call to fail.
fail("The test case is a prototype.");
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment