!11 [sync] PR-6: Fix test stuck

From: @openeuler-sync-bot 
Reviewed-by: @DingliZhang 
Signed-off-by: @DingliZhang
This commit is contained in:
openeuler-ci-bot 2025-02-11 03:31:54 +00:00 committed by Gitee
commit e85a49568c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 30 additions and 1 deletions

View File

@ -1,6 +1,6 @@
Name: httpunit Name: httpunit
Version: 1.7 Version: 1.7
Release: 2 Release: 3
Epoch: 0 Epoch: 0
URL: http://httpunit.sourceforge.net/ URL: http://httpunit.sourceforge.net/
Summary: Automated web site testing toolkit Summary: Automated web site testing toolkit
@ -15,6 +15,7 @@ Patch1: httpunit-rhino-1.7.7.patch
Patch2: httpunit-servlettest.patch Patch2: httpunit-servlettest.patch
Patch3: httpunit-servlet31.patch Patch3: httpunit-servlet31.patch
Patch4: junit4.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: 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: glassfish-servlet-api <= 3.1.0 javamail >= 0:1.3 rhino java-devel >= 1:1.6.0
BuildRequires: javapackages-local BuildRequires: javapackages-local
@ -88,6 +89,9 @@ popd
%doc doc/* %doc doc/*
%changelog %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 * Fri Sep 16 2022 caodongxia <caodongxia@h-partners.com> - 0:1.7-2
- Add glassfish-servlet-api version limit - Add glassfish-servlet-api version limit

View 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