Skip to content

Commit 7a6ba0a

Browse files
committed
Only run unrecognized java version test on java 11
If we have an unrecognized java version, presumably it is higher than 11. It should have a notion of module name like 11 and 13. Running this test on 8 breaks the test because there is no module name so that part is missing from the slug. Seems the unrecognized versions will most likely follow this path so we fallback to java 11 javadocs with a module name rather than java 8 without them.
1 parent fd18522 commit 7a6ba0a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/orchard/java_test.clj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,12 @@
295295
(get-url ['com.amazonaws.services.lambda.AWSLambdaClient])))
296296
(is (= "https://kafka.apache.org/090/javadoc/org/apache/kafka/clients/consumer/ConsumerConfig.html"
297297
(get-url '[org.apache.kafka.clients.consumer.ConsumerConfig])))))
298-
(testing "Unrecognized java version doesn't blank out the javadocs"
299-
(with-redefs [misc/java-api-version 12345
300-
cache (atom {})]
301-
(is (= "https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html"
302-
(get-url ['java.lang.String])))))))
298+
(when (>= misc/java-api-version 11)
299+
(testing "Unrecognized java version doesn't blank out the javadocs"
300+
(with-redefs [misc/java-api-version 12345
301+
cache (atom {})]
302+
(is (= "https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html"
303+
(get-url ['java.lang.String]))))))))
303304

304305
(deftest class-resolution-test
305306
(let [ns (ns-name *ns*)]

0 commit comments

Comments
 (0)