You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by se...@apache.org on 2022/01/24 13:44:24 UTC

[systemds] branch main updated: [MINOR] Fix FederatedWorkerHandlerTest

This is an automated email from the ASF dual-hosted git repository.

sebwrede pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git


The following commit(s) were added to refs/heads/main by this push:
     new 72fc2ac  [MINOR] Fix FederatedWorkerHandlerTest
72fc2ac is described below

commit 72fc2ac25e9934159c6256daca31d64bf522cff8
Author: sebwrede <sw...@know-center.at>
AuthorDate: Mon Jan 24 14:33:19 2022 +0100

    [MINOR] Fix FederatedWorkerHandlerTest
---
 .../sysds/test/functions/privacy/FederatedWorkerHandlerTest.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/test/java/org/apache/sysds/test/functions/privacy/FederatedWorkerHandlerTest.java b/src/test/java/org/apache/sysds/test/functions/privacy/FederatedWorkerHandlerTest.java
index 4c3d145..7339aea 100644
--- a/src/test/java/org/apache/sysds/test/functions/privacy/FederatedWorkerHandlerTest.java
+++ b/src/test/java/org/apache/sysds/test/functions/privacy/FederatedWorkerHandlerTest.java
@@ -160,8 +160,8 @@ public class FederatedWorkerHandlerTest extends AutomatedTestBase {
 		getAndLoadTestConfiguration("aggregation");
 		String HOME = SCRIPT_DIR + TEST_DIR_fed;
 
-		double[][] A = getRandomMatrix(rows, cols, -10, 10, 1, 1);
-		writeInputMatrixWithMTD("A", A, false, new MatrixCharacteristics(rows, cols, blocksize, rows * cols), new PrivacyConstraint(privacyLevel));
+		double[][] A = getRandomMatrix(rows/2, cols, -10, 10, 1, 1);
+		writeInputMatrixWithMTD("A", A, false, new MatrixCharacteristics(rows/2, cols, blocksize, (rows/2) * cols), new PrivacyConstraint(privacyLevel));
 		int port = getRandomAvailablePort();
 		Thread t = startLocalFedWorkerThread(port);
 
@@ -177,8 +177,7 @@ public class FederatedWorkerHandlerTest extends AutomatedTestBase {
 		for(double[] doubles : A) {
 			sum += Arrays.stream(doubles).sum();
 		}
-		sum *= 2;
-		
+
 		if ( expectedException == null )
 			writeExpectedScalar("S", sum);