This is an automated email from the ASF dual-hosted git repository.
ningyougang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-php.git
The following commit(s) were added to refs/heads/master by this push:
new 173468d Set Gradle version to 6.9.1, fix Junit and test case (#121)
173468d is described below
commit 173468dffdae68df671efb41f3f6cb84eaefa693
Author: Luke-Roy-IBM <[email protected]>
AuthorDate: Thu Aug 4 07:48:46 2022 +0200
Set Gradle version to 6.9.1, fix Junit and test case (#121)
---
build.gradle | 1 +
core/php7.4Action/runner.php | 2 +-
core/php8.0Action/runner.php | 2 +-
gradle/wrapper/gradle-wrapper.properties | 2 +-
gradlew | 4 ++--
gradlew.bat | 4 ++--
tests/build.gradle | 3 +++
7 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/build.gradle b/build.gradle
index ca22a4f..f94dc1d 100644
--- a/build.gradle
+++ b/build.gradle
@@ -28,6 +28,7 @@ subprojects {
}
allprojects {
repositories {
+ jcenter()
mavenLocal()
mavenCentral()
maven {
diff --git a/core/php7.4Action/runner.php b/core/php7.4Action/runner.php
index f79955a..1fc569e 100755
--- a/core/php7.4Action/runner.php
+++ b/core/php7.4Action/runner.php
@@ -72,7 +72,7 @@ while ($f = fgets(STDIN)) {
if (!is_array($result)) {
file_put_contents('php://stderr', 'Result must be an array but has
type "'
. gettype($result) . '": ' . $result);
- file_put_contents('php://stdout', 'The action did not return a
dictionary.');
+ file_put_contents('php://stdout', 'The action did not return a
dictionary or array.');
$result = (string)$result;
} else {
$result = json_encode((object)$result);
diff --git a/core/php8.0Action/runner.php b/core/php8.0Action/runner.php
index f79955a..1fc569e 100755
--- a/core/php8.0Action/runner.php
+++ b/core/php8.0Action/runner.php
@@ -72,7 +72,7 @@ while ($f = fgets(STDIN)) {
if (!is_array($result)) {
file_put_contents('php://stderr', 'Result must be an array but has
type "'
. gettype($result) . '": ' . $result);
- file_put_contents('php://stdout', 'The action did not return a
dictionary.');
+ file_put_contents('php://stdout', 'The action did not return a
dictionary or array.');
$result = (string)$result;
} else {
$result = json_encode((object)$result);
diff --git a/gradle/wrapper/gradle-wrapper.properties
b/gradle/wrapper/gradle-wrapper.properties
index 0e1a4ff..332b043 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -16,6 +16,6 @@
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index d4ee78f..8e25e6c 100755
--- a/gradlew
+++ b/gradlew
@@ -7,7 +7,7 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -44,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to
pass JVM options to this script.
-DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8'
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
diff --git a/gradlew.bat b/gradlew.bat
index ad0ff10..9618d8d 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -5,7 +5,7 @@
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
-@rem http://www.apache.org/licenses/LICENSE-2.0
+@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@@ -30,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS
to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
diff --git a/tests/build.gradle b/tests/build.gradle
index de9e0e0..b718fb8 100644
--- a/tests/build.gradle
+++ b/tests/build.gradle
@@ -34,7 +34,10 @@ tasks.withType(Test) {
}
dependencies {
+ implementation "junit:junit:4.11"
implementation "org.scala-lang:scala-library:${gradle.scala.version}"
+ implementation "org.scalatest:scalatest_${gradle.scala.depVersion}:3.0.8"
+ implementation
"org.apache.openwhisk:openwhisk-common:${gradle.openwhisk.version}"
implementation
"org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:tests"
implementation
"org.apache.openwhisk:openwhisk-tests:${gradle.openwhisk.version}:test-sources"
implementation group: 'com.typesafe.akka', name:
"akka-http2-support_${gradle.scala.depVersion}", version:
"${gradle.akka_http.version}"