modernize locale instantiations (fixes an error found by the modernizer plugin) - use Locale.of() instead of new Locale() use recommended gradle toolchain syntax to specify Java class file format version see https://docs.gradle.org/current/userguide/java_plugin.html#toolchain_and_compatibility mark html5 for later fix (it's the default) use dummy byte arrays to work around mockito exception ``` org.mockito.exceptions.base.MockitoException: Mockito cannot mock this class: class java.nio.ByteBuffer. If you're not sure why you're getting this error, please open an issue on GitHub. Java : 21 JVM vendor name : Ubuntu JVM vendor version : 21.0.6+7-Ubuntu-122.04.1 JVM name : OpenJDK 64-Bit Server VM JVM version : 21.0.6+7-Ubuntu-122.04.1 JVM info : mixed mode, sharing OS name : Linux OS version : 5.15.0-136-generic You are seeing this disclaimer because Mockito is configured to create inlined mocks. You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc. Underlying exception : org.mockito.exceptions.base.MockitoException: Unsupported settings with this type 'java.nio.ByteBuffer' at app//org.apache.fineract.infrastructure.event.external.jobs.SendAsynchronousEventsTaskletTest.givenBatchSize2WhenEventSendFailsThenExecutionStops(SendAsynchronousEventsTaskletTest.java:170) at java.base@21.0.6/java.lang.reflect.Method.invoke(Method.java:580) at java.base@21.0.6/java.util.ArrayList.forEach(ArrayList.java:1596) at java.base@21.0.6/java.util.ArrayList.forEach(ArrayList.java:1596) Caused by: org.mockito.exceptions.base.MockitoException: Unsupported settings with this type 'java.nio.ByteBuffer' at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:168) at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:399) at app//net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:190) at app//net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:410) ... 4 more ``` see also: https://stackoverflow.com/questions/47046996/java-lang-unsupportedoperationexception-when-mocking-java-nio-bytebuffer-class wrap byte arrays with ByteBuffer fix: ``` /home/adamm/git/apache/fineract/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTaskletTest.java:148: error: incompatible types: byte[] cannot be converted to ByteBuffer "anidempotencyKey", "aSchema", "dummy".getBytes()); ^ /home/adamm/git/apache/fineract/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTaskletTest.java:170: error: incompatible types: byte[] cannot be converted to ByteBuffer "anidempotencyKey", "aSchema", "dummy".getBytes()); ^ /home/adamm/git/apache/fineract/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTaskletTest.java:189: error: incompatible types: byte[] cannot be converted to ByteBuffer "anidempotencyKey", "aSchema", "dummy".getBytes()); ^ /home/adamm/git/apache/fineract/fineract-provider/src/test/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTaskletTest.java:210: error: incompatible types: byte[] cannot be converted to ByteBuffer "anidempotencyKey", "aSchema", "dummy".getBytes()); ``` ...and use StandardCharsets with getBytes
46 lines
1.7 KiB
YAML
46 lines
1.7 KiB
YAML
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); 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
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
|
|
# https://www.gitpod.io
|
|
# https://www.gitpod.io/docs/41_Config_Gitpod_File/
|
|
# https://github.com/gitpod-io/workspace-images/tree/master/mysql
|
|
#
|
|
# FIXME - dead code? see https://github.com/apache/fineract/pull/4590#issuecomment-2809760331
|
|
|
|
image: gitpod/workspace-mysql:2022-08-04-13-40-17
|
|
ports:
|
|
- port: 3306
|
|
onOpen: ignore
|
|
- port: 8005
|
|
onOpen: ignore
|
|
- port: 8009
|
|
onOpen: ignore
|
|
- port: 8080
|
|
- port: 8081
|
|
onOpen: ignore
|
|
- port: 8443
|
|
tasks:
|
|
- command: |
|
|
# NB MySQL on GitPod.io is currently quite slow.
|
|
# Using authentication_string= instead of password= due to mysql major version difference
|
|
mysql -e "USE mysql;\nUPDATE user SET authentication_string=PASSWORD('mysql') WHERE user='root';\nFLUSH PRIVILEGES;\n"
|
|
./gradlew createDB -PdbName=fineract_tenants
|
|
./gradlew createDB -PdbName=fineract_default
|
|
./gradlew build -x test
|
|
init: sdk default java 17.0.4.fx-zulu
|