Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken unit tests and warnings #609

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

praxis-innovation
Copy link

@praxis-innovation praxis-innovation commented Feb 28, 2023

This PR fixes broken unit tests and some warnings.

My console log for ./gradlew clean test looks like below after these fixes:

➜  bitcoin-kit-android git:(fix/broken-tests) ./gradlew clean test                           

> Task :dashkit:externalNativeBuildCleanDebug
Clean blstmp arm64-v8a,relic_s arm64-v8a,dashjbls arm64-v8a,bls arm64-v8a,pthread arm64-v8a
ninja: Entering directory `/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/dashkit/.cxx/cmake/debug/arm64-v8a'
[1/1] Cleaning all built files...
Cleaning... 0 files.
Clean dashjbls x86,blstmp x86,pthread x86,relic_s x86,bls x86
ninja: Entering directory `/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/dashkit/.cxx/cmake/debug/x86'
[1/1] Cleaning all built files...
Cleaning... 0 files.
Clean bls x86_64,dashjbls x86_64,relic_s x86_64,blstmp x86_64,pthread x86_64
ninja: Entering directory `/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/dashkit/.cxx/cmake/debug/x86_64'
[1/1] Cleaning all built files...
Cleaning... 0 files.

> Task :dashkit:externalNativeBuildCleanRelease
Clean dashjbls x86,blstmp x86,pthread x86,relic_s x86,bls x86
ninja: Entering directory `/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/dashkit/.cxx/cmake/release/x86'
[1/1] Cleaning all built files...
Cleaning... 0 files.

> Task :bitcoincore:kaptDebugKotlin
/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/debug/io/horizontalsystems/bitcoincore/models/Transaction.java:19: warning: blockHash column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
public class Transaction {
       ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/debug/io/horizontalsystems/bitcoincore/models/TransactionInput.java:20: warning: transactionHash column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
public final class TransactionInput {
             ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/debug/io/horizontalsystems/bitcoincore/models/TransactionOutput.java:16: warning: publicKeyPath column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
public final class TransactionOutput {
             ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/debug/io/horizontalsystems/bitcoincore/storage/PublicKeyDao.java:23: warning: The query returns some columns [c] which are not used by io.horizontalsystems.bitcoincore.models.PublicKey. You can use @ColumnInfo annotation on the fields to specify the mapping.  You can suppress this warning by annotating the method with @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH). Columns returned by the query: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH, c. Fields in io.horizontalsystems.bitcoincore.models.PublicKey: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH.
    public abstract java.util.List<io.horizontalsystems.bitcoincore.models.PublicKey> getAllUsed();
                                                                                      ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/debug/io/horizontalsystems/bitcoincore/storage/PublicKeyDao.java:27: warning: The query returns some columns [c] which are not used by io.horizontalsystems.bitcoincore.models.PublicKey. You can use @ColumnInfo annotation on the fields to specify the mapping.  You can suppress this warning by annotating the method with @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH). Columns returned by the query: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH, c. Fields in io.horizontalsystems.bitcoincore.models.PublicKey: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH.
    public abstract java.util.List<io.horizontalsystems.bitcoincore.models.PublicKey> getAllUnused();
                                                                                      ^
> Task :bitcoincore:compileDebugKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/BlockchainComApi.kt: (67, 55): There is more than one label with such a name in this scope
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/transactions/extractors/TransactionMetadataExtractor.kt: (53, 26): Variable 'fee' initializer is redundant

> Task :bitcoincashkit:kaptDebugKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :bitcoincore:kaptReleaseKotlin
/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/release/io/horizontalsystems/bitcoincore/models/Transaction.java:19: warning: blockHash column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
public class Transaction {
       ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/release/io/horizontalsystems/bitcoincore/models/TransactionInput.java:20: warning: transactionHash column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
public final class TransactionInput {
             ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/release/io/horizontalsystems/bitcoincore/models/TransactionOutput.java:16: warning: publicKeyPath column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
public final class TransactionOutput {
             ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/release/io/horizontalsystems/bitcoincore/storage/PublicKeyDao.java:23: warning: The query returns some columns [c] which are not used by io.horizontalsystems.bitcoincore.models.PublicKey. You can use @ColumnInfo annotation on the fields to specify the mapping.  You can suppress this warning by annotating the method with @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH). Columns returned by the query: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH, c. Fields in io.horizontalsystems.bitcoincore.models.PublicKey: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH.
    public abstract java.util.List<io.horizontalsystems.bitcoincore.models.PublicKey> getAllUsed();
                                                                                      ^/Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/build/tmp/kapt3/stubs/release/io/horizontalsystems/bitcoincore/storage/PublicKeyDao.java:27: warning: The query returns some columns [c] which are not used by io.horizontalsystems.bitcoincore.models.PublicKey. You can use @ColumnInfo annotation on the fields to specify the mapping.  You can suppress this warning by annotating the method with @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH). Columns returned by the query: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH, c. Fields in io.horizontalsystems.bitcoincore.models.PublicKey: path, account, address_index, external, publicKeyHash, publicKey, scriptHashP2WPKH.
    public abstract java.util.List<io.horizontalsystems.bitcoincore.models.PublicKey> getAllUnused();
                                                                                      ^
> Task :bitcoinkit:kaptDebugKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :dashkit:kaptDebugKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :bitcoincore:compileReleaseKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/managers/BlockchainComApi.kt: (67, 55): There is more than one label with such a name in this scope
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/transactions/extractors/TransactionMetadataExtractor.kt: (53, 26): Variable 'fee' initializer is redundant

> Task :dashkit:compileDebugKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/dashkit/src/main/kotlin/io/horizontalsystems/dashkit/models/SpecialTransaction.kt: (7, 9): Parameter 'extraPayload' is never used

> Task :litecoinkit:kaptDebugKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :app:compileDebugKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/MainActivity.kt: (10, 64): 'OnNavigationItemSelectedListener' is deprecated. Deprecated in Java
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/MainActivity.kt: (25, 20): 'setOnNavigationItemSelectedListener(BottomNavigationView.OnNavigationItemSelectedListener?): Unit' is deprecated. Deprecated in Java

> Task :bitcoincashkit:kaptReleaseKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :bitcoinkit:kaptReleaseKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :dashkit:kaptReleaseKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :litecoinkit:kaptReleaseKotlin
[WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: androidx.room.RoomProcessor (DYNAMIC).

> Task :dashkit:compileReleaseKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/dashkit/src/main/kotlin/io/horizontalsystems/dashkit/models/SpecialTransaction.kt: (7, 9): Parameter 'extraPayload' is never used

> Task :app:compileReleaseKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/MainActivity.kt: (10, 64): 'OnNavigationItemSelectedListener' is deprecated. Deprecated in Java
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/app/src/main/java/io/horizontalsystems/bitcoinkit/demo/MainActivity.kt: (25, 20): 'setOnNavigationItemSelectedListener(BottomNavigationView.OnNavigationItemSelectedListener?): Unit' is deprecated. Deprecated in Java

> Task :bitcoincore:compileDebugUnitTestKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/TestHelpers.kt: (26, 42): Parameter 'id' is never used, could be renamed to _
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/TestHelpers.kt: (37, 38): Parameter 'id' is never used, could be renamed to _
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/models/TransactionTest.kt: (87, 17): Variable 'txHash' is never used

> Task :bitcoincore:testDebugUnitTest
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.powermock.reflect.internal.WhiteboxImpl (file:/Users/praxis/.gradle/caches/transforms-2/files-2.1/e004ec1099e7a02a40102b3bc4f97cf9/jetified-powermock-reflect-2.0.7.jar) to method java.lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.powermock.reflect.internal.WhiteboxImpl
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Task :bitcoincore:compileReleaseUnitTestKotlin
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/TestHelpers.kt: (26, 42): Parameter 'id' is never used, could be renamed to _
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/TestHelpers.kt: (37, 38): Parameter 'id' is never used, could be renamed to _
w: /Users/praxis/code/src/github/praxis-innovation/bitcoin-kit-android/bitcoincore/src/test/kotlin/io/horizontalsystems/bitcoincore/models/TransactionTest.kt: (87, 17): Variable 'txHash' is never used

> Task :bitcoincore:testReleaseUnitTest
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.powermock.reflect.internal.WhiteboxImpl (file:/Users/praxis/.gradle/caches/transforms-2/files-2.1/e004ec1099e7a02a40102b3bc4f97cf9/jetified-powermock-reflect-2.0.7.jar) to method java.lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.powermock.reflect.internal.WhiteboxImpl
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Task :bitcoinkit:testDebugUnitTest
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.powermock.reflect.internal.WhiteboxImpl (file:/Users/praxis/.gradle/caches/transforms-2/files-2.1/e004ec1099e7a02a40102b3bc4f97cf9/jetified-powermock-reflect-2.0.7.jar) to method java.lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.powermock.reflect.internal.WhiteboxImpl
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Task :bitcoinkit:testReleaseUnitTest
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.powermock.reflect.internal.WhiteboxImpl (file:/Users/praxis/.gradle/caches/transforms-2/files-2.1/e004ec1099e7a02a40102b3bc4f97cf9/jetified-powermock-reflect-2.0.7.jar) to method java.lang.Object.clone()
WARNING: Please consider reporting this to the maintainers of org.powermock.reflect.internal.WhiteboxImpl
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

BUILD SUCCESSFUL in 1m 7s
361 actionable tasks: 361 executed

Signed-off-by: Praxis Innovation <[email protected]>
@gburkhow
Copy link

gburkhow commented Oct 9, 2024

glenn burkhow
my bitcoin wallet
My car fund 0c943b3f-5e4a-45b2-ac80-b61685515a7f

Coin wallet
(Bach32)bc1q7raf9ls273qhkgjhpkthjwevraalqwh8pjhw64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants