Package: ojalgo
Version: 52.0.1+ds-1
Severity: serious
Tags: patch
Justification: Policy 4.9
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu mantic ubuntu-patch

Hi Pierre,

The ojalgo package has been failing to build from source in Ubuntu, because
its tests are trying to access the network:

[...]
[ERROR] Failures: 
[ERROR]   YahooDataSourceTest.testFetchDaily:54 No data!
[ERROR]   YahooDataSourceTest.testFetchMonthly:62 No data!
[ERROR]   YahooDataSourceTest.testFetchWeekly:70 No data!
[ERROR]   
YahooDataSourceTest.testYahooDailyAAPL:79->FinanceSeriesTests.assertAtLeastExpectedItems:64
 No data!
[ERROR]   
YahooDataSourceTest.testYahooMonthlyAAPL:87->FinanceSeriesTests.assertAtLeastExpectedItems:64
 No data!
[ERROR]   
YahooDataSourceTest.testYahooWeeklyAAPL:95->FinanceSeriesTests.assertAtLeastExpectedItems:64
 No data!
[ERROR] Errors: 
[ERROR]   
YahooDataSourceTest.testDeriveDistributions:47->FinanceSeriesTests.doTestDeriveDistribution:84
 » NegativeArraySize
[ERROR]   OptimisationServiceTest.testEnvironment:67 » Runtime 
java.util.concurrent.Exec...
[ERROR]   OptimisationServiceTest.testTest:55 » Runtime 
java.util.concurrent.ExecutionEx...
[ERROR]   OptimisationServiceTest.testVeryBasicModel:41 » Runtime 
java.util.concurrent.E...
[...]

  (https://launchpad.net/ubuntu/+source/ojalgo/52.0.1+ds-1/+build/26010077)

There was already a patch in the source to disable network tests, but it
appears that some new network tests have now been added.  I've extended the
patch to disable these tests as well; please see the attached diff.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru ojalgo-52.0.1+ds/debian/patches/no_network_tests.patch 
ojalgo-52.0.1+ds/debian/patches/no_network_tests.patch
--- ojalgo-52.0.1+ds/debian/patches/no_network_tests.patch      2023-01-18 
13:33:30.000000000 -0800
+++ ojalgo-52.0.1+ds/debian/patches/no_network_tests.patch      2023-06-12 
12:54:52.000000000 -0700
@@ -4,8 +4,10 @@
 Reviewed-by: Pierre Gruet <p...@debian.org>
 Last-Update: 2022-12-17
 
---- 
a/src/test/java/org/ojalgo/data/domain/finance/series/AlphaVantageDataSourceTest.java
-+++ 
b/src/test/java/org/ojalgo/data/domain/finance/series/AlphaVantageDataSourceTest.java
+Index: 
ojalgo-52.0.1+ds/src/test/java/org/ojalgo/data/domain/finance/series/AlphaVantageDataSourceTest.java
+===================================================================
+--- 
ojalgo-52.0.1+ds.orig/src/test/java/org/ojalgo/data/domain/finance/series/AlphaVantageDataSourceTest.java
++++ 
ojalgo-52.0.1+ds/src/test/java/org/ojalgo/data/domain/finance/series/AlphaVantageDataSourceTest.java
 @@ -22,6 +22,7 @@
   */
  package org.ojalgo.data.domain.finance.series;
@@ -22,3 +24,43 @@
  public class AlphaVantageDataSourceTest extends FinanceSeriesTests {
  
      public AlphaVantageDataSourceTest() {
+Index: 
ojalgo-52.0.1+ds/src/test/java/org/ojalgo/data/domain/finance/series/YahooDataSourceTest.java
+===================================================================
+--- 
ojalgo-52.0.1+ds.orig/src/test/java/org/ojalgo/data/domain/finance/series/YahooDataSourceTest.java
++++ 
ojalgo-52.0.1+ds/src/test/java/org/ojalgo/data/domain/finance/series/YahooDataSourceTest.java
+@@ -22,6 +22,7 @@
+  */
+ package org.ojalgo.data.domain.finance.series;
+ 
++import org.junit.jupiter.api.Disabled;
+ import org.junit.jupiter.api.Test;
+ import org.ojalgo.TestUtils;
+ import org.ojalgo.type.CalendarDateUnit;
+@@ -31,6 +32,7 @@
+  *
+  * @author apete
+  */
++@Disabled("Requires network access")
+ public class YahooDataSourceTest extends FinanceSeriesTests {
+ 
+     private static YahooSession SESSION = new YahooSession();
+Index: 
ojalgo-52.0.1+ds/src/test/java/org/ojalgo/optimisation/service/OptimisationServiceTest.java
+===================================================================
+--- 
ojalgo-52.0.1+ds.orig/src/test/java/org/ojalgo/optimisation/service/OptimisationServiceTest.java
++++ 
ojalgo-52.0.1+ds/src/test/java/org/ojalgo/optimisation/service/OptimisationServiceTest.java
+@@ -1,6 +1,7 @@
+ package org.ojalgo.optimisation.service;
+ 
+ import org.junit.jupiter.api.AfterEach;
++import org.junit.jupiter.api.Disabled;
+ import org.junit.jupiter.api.Test;
+ import org.ojalgo.TestUtils;
+ import org.ojalgo.netio.BasicLogger;
+@@ -9,6 +10,7 @@
+ import org.ojalgo.optimisation.ExpressionsBasedModel;
+ import org.ojalgo.optimisation.Optimisation.Result;
+ 
++@Disabled("Requires network access")
+ public class OptimisationServiceTest {
+ 
+     private static final String PATH_ENVIRONMENT = 
"/optimisation/v01/environment";

Reply via email to