Skip to content

Commit fbaf745

Browse files
committed
Adjust RPM tests for changes in Fedora 41
1 parent 1eeaefa commit fbaf745

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

rpm/org.eclipse.linuxtools.rpm.core.tests/src/org/eclipse/linuxtools/rpm/core/tests/DownloadPrepareSourcesTest.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2013, 2023 Red Hat, Inc.
2+
* Copyright (c) 2013, 2025 Red Hat, Inc.
33
*
44
* This program and the accompanying materials are made
55
* available under the terms of the Eclipse Public License 2.0
@@ -20,6 +20,7 @@
2020
import java.io.File;
2121
import java.io.IOException;
2222
import java.net.HttpURLConnection;
23+
import java.net.URI;
2324
import java.net.URL;
2425

2526
import org.eclipse.core.resources.IContainer;
@@ -212,16 +213,16 @@ public void checkPreparedSources(RPMProject project, RPMProjectLayout layout) th
212213
switch (layout) {
213214
case RPMBUILD:
214215
assertNotNull(buildFolder.getParent().findMember("BUILD"));
215-
assertEquals(2, buildFolder.members().length);
216+
assertEquals(1, buildFolder.members().length);
216217
// check if the file exists under BUILD folder
217-
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1"));
218+
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1-build"));
218219
assertTrue(helloBuildFolder.exists());
219220
// there should be some stuff within hello-2.8/ folder
220221
assertTrue(helloBuildFolder.members().length >= 1);
221222
break;
222223
case FLAT:
223-
assertEquals(10, buildFolder.members().length);
224-
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1"));
224+
assertEquals(9, buildFolder.members().length);
225+
helloBuildFolder = buildFolder.getFolder(new Path("hello-2.12.1-build"));
225226
assertTrue(helloBuildFolder.exists());
226227
// there should be some stuff within hello-2.12.1/ folder
227228
assertTrue(helloBuildFolder.members().length >= 1);
@@ -238,7 +239,7 @@ public void checkPreparedSources(RPMProject project, RPMProjectLayout layout) th
238239
*/
239240
public void downloadFile(RPMProject project) throws IOException, InterruptedException {
240241
// connect to the URL
241-
URL url = new URL("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz");
242+
URL url = URI.create("http://ftp.gnu.org/gnu/hello/hello-2.8.tar.gz").toURL();
242243
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
243244
assertEquals(HttpURLConnection.HTTP_OK, connection.getResponseCode());
244245

0 commit comments

Comments
 (0)