fix test stuck
(cherry picked from commit e54915edb9f3058efcb91ab2d4eea299657bf51b)
This commit is contained in:
parent
6e9f19f731
commit
e445d0e781
@ -1,6 +1,6 @@
|
||||
Name: httpunit
|
||||
Version: 1.7
|
||||
Release: 2
|
||||
Release: 3
|
||||
Epoch: 0
|
||||
URL: http://httpunit.sourceforge.net/
|
||||
Summary: Automated web site testing toolkit
|
||||
@ -15,6 +15,7 @@ Patch1: httpunit-rhino-1.7.7.patch
|
||||
Patch2: httpunit-servlettest.patch
|
||||
Patch3: httpunit-servlet31.patch
|
||||
Patch4: junit4.patch
|
||||
Patch5: replace-getHostPath-with-its-real-address.patch
|
||||
BuildRequires: jpackage-utils >= 0:1.6 ant >= 0:1.6 nekohtml jtidy junit >= 0:3.8
|
||||
BuildRequires: glassfish-servlet-api <= 3.1.0 javamail >= 0:1.3 rhino java-devel >= 1:1.6.0
|
||||
BuildRequires: javapackages-local
|
||||
@ -88,6 +89,9 @@ popd
|
||||
%doc doc/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 06 2024 Ge Wang <wang__ge@126.com> - 0:1.7-3
|
||||
- Fix test stuck
|
||||
|
||||
* Fri Sep 16 2022 caodongxia <caodongxia@h-partners.com> - 0:1.7-2
|
||||
- Add glassfish-servlet-api version limit
|
||||
|
||||
|
||||
25
replace-getHostPath-with-its-real-address.patch
Normal file
25
replace-getHostPath-with-its-real-address.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From e41b364407a1b11d80a60606cf61eb5954fc7111 Mon Sep 17 00:00:00 2001
|
||||
From: wang--ge <wang__ge@126.com>
|
||||
Date: Tue, 6 Aug 2024 17:49:46 +0800
|
||||
Subject: [PATCH] replace getHostPath with its real address
|
||||
|
||||
---
|
||||
test/com/meterware/httpunit/WebClientTest.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/com/meterware/httpunit/WebClientTest.java b/test/com/meterware/httpunit/WebClientTest.java
|
||||
index 08ffa0e..9a4b8a6 100644
|
||||
--- a/test/com/meterware/httpunit/WebClientTest.java
|
||||
+++ b/test/com/meterware/httpunit/WebClientTest.java
|
||||
@@ -864,7 +864,7 @@ public class WebClientTest extends HttpUnitTest {
|
||||
defineResource( "Compressed.html", new CompressedPseudoServlet( expectedResponse, /* suppress length */ true ) );
|
||||
|
||||
WebConversation wc = new WebConversation();
|
||||
- WebResponse wr = wc.getResponse( getHostPath() + "/Compressed.html" );
|
||||
+ WebResponse wr = wc.getResponse("http://127.0.0.1:41649/Compressed.html");
|
||||
assertEquals( "Content-Encoding header", "gzip", wr.getHeaderField( "Content-encoding" ) );
|
||||
assertEquals( "Content-Type", "text/plain", wr.getContentType() );
|
||||
assertEquals( "Content", expectedResponse, wr.getText().trim() );
|
||||
--
|
||||
2.44.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user