From 1ed3de08fafa22182a525736423e245a12555e09 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sun, 20 Apr 2014 19:11:15 -0600 Subject: [PATCH] fix Misc test failures The Misc test was failing when run as "make input=Misc run" since test-flags did not include $(build)/extra-dir in the class library, leading the ClassLoader.getResources test to fail. Also, the UnknownHostException test was not reliable -- some ISPs (mine included) return DNS matches for bogus hostnames, defaulting to the IP address of a webserver intended to help users with name resolution problems. That's dumb, I know, but I'm guessing I'm not the only person with a dumb ISP, and it seems better to just remove the test than make people think Avian is broken when it's really just their DNS server that's broken. --- makefile | 3 ++- test/Misc.java | 8 -------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/makefile b/makefile index bbebd740a0..a7e4389511 100755 --- a/makefile +++ b/makefile @@ -1433,7 +1433,8 @@ endif class-name = $(patsubst $(1)/%.class,%,$(2)) class-names = $(foreach x,$(2),$(call class-name,$(1),$(x))) -test-flags = -Djava.library.path=$(build) -cp $(build)/test +test-flags = -Djava.library.path=$(build) \ + -cp $(build)/test$(target-path-separator)$(build)/extra-dir test-args = $(test-flags) $(input) diff --git a/test/Misc.java b/test/Misc.java index 274a7a0335..a4361a3bfd 100644 --- a/test/Misc.java +++ b/test/Misc.java @@ -302,14 +302,6 @@ public class Misc { (new byte[] { 0, 0, 0, 0 }, java.net.InetAddress.getByName("0.0.0.0").getAddress())); - try { - java.net.InetAddress.getByName - ("bs.thisdomaindoesntexistseriouslynoway"); - throw new AssertionError(); - } catch (java.net.UnknownHostException e) { - // cool - } - expect(! staticRan); Static.run(); expect(staticRan);