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

unit-test failure when cloning fabric as other name #2987

Closed
justin-themedium opened this issue Oct 18, 2021 · 0 comments
Closed

unit-test failure when cloning fabric as other name #2987

justin-themedium opened this issue Oct 18, 2021 · 0 comments

Comments

@justin-themedium
Copy link
Contributor

  • Problem
    core/ledger/kvledger/ unit test fails when running the unit-test in another directory, not fabric/
--- FAIL: TestGenerateSnapshotErrors (13.43s)
    --- FAIL: TestGenerateSnapshotErrors/block_store_returns_error (1.10s)
        snapshot_test.go:571:
            	Error Trace:	snapshot_test.go:571
            	Error:      	"leveldb: closed\ninternal leveldb error while obtaining db iterator\ngithub.mirror.nvdadr.com/hyperledger/fabric/common/ledger/util/leveldbhelper.(*DBHandle).GetIterator\n\t/Users/medium/src/hyperledger/fabrictest/common/ledger/util/leveldbhelper/leveldb_provider.go:262\ngithub.mirror.nvdadr.com/hyperledger/fabric/common/ledger/blkstorage.(*blockIndex).exportUniqueTxIDs\n\t/Users/medium/src/hyperledger/fabrictest/common/ledger/blkstorage/blockindex.go:304\ngithub.mirror.nvdadr.com/hyperledger/fabric/common/ledger/blkstorage.(*BlockStore).ExportTxIds\n\t/Users/medium/src/hyperledger/fabrictest/common/ledger/blkstorage/blockstore.go:105\ngithub.mirror.nvdadr.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).generateSnapshot\n\t/Users/medium/src/hyperledger/fabrictest/core/ledger/kvledger/snapshot.go:114\ngithub.mirror.nvdadr.com/hyperledger/fabric/core/ledger/kvledger.TestGenerateSnapshotErrors.func4\n\t/Users/medium/src/hyperledger/fabrictest/core/ledger/kvledger/snapshot_test.go:567\ntesting.tRunner\n\t/usr/local/Cellar/go@1.14/1.14.15/libexec/src/testing/testing.go:1050\nruntime.goexit\n\t/usr/local/Cellar/go@1.14/1.14.15/libexec/src/runtime/asm_amd64.s:1373" does not contain "fabric/common/ledger/blkstorage/blockindex.go"
            	Test:       	TestGenerateSnapshotErrors/block_store_returns_error
    --- FAIL: TestGenerateSnapshotErrors/config_history_mgr_returns_error (1.32s)
        snapshot_test.go:581:
            	Error Trace:	snapshot_test.go:581
            	Error:      	"leveldb: closed\ninternal leveldb error while obtaining db iterator\ngithub.mirror.nvdadr.com/hyperledger/fabric/common/ledger/util/leveldbhelper.(*DBHandle).GetIterator\n\t/Users/medium/src/hyperledger/fabrictest/common/ledger/util/leveldbhelper/leveldb_provider.go:262\ngithub.mirror.nvdadr.com/hyperledger/fabric/core/ledger/confighistory.(*db).getNamespaceIterator\n\t/Users/medium/src/hyperledger/fabrictest/core/ledger/confighistory/db_helper.go:114\ngithub.mirror.nvdadr.com/hyperledger/fabric/core/ledger/confighistory.(*Retriever).ExportConfigHistory\n\t/Users/medium/src/hyperledger/fabrictest/core/ledger/confighistory/mgr.go:221\ngithub.mirror.nvdadr.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).generateSnapshot\n\t/Users/medium/src/hyperledger/fabrictest/core/ledger/kvledger/snapshot.go:120\ngithub.mirror.nvdadr.com/hyperledger/fabric/core/ledger/kvledger.TestGenerateSnapshotErrors.func5\n\t/Users/medium/src/hyperledger/fabrictest/core/ledger/kvledger/snapshot_test.go:577\ntesting.tRunner\n\t/usr/local/Cellar/go@1.14/1.14.15/libexec/src/testing/testing.go:1050\nruntime.goexit\n\t/usr/local/Cellar/go@1.14/1.14.15/libexec/src/runtime/asm_amd64.s:1373" does not contain "fabric/core/ledger/confighistory/mgr.go"
            	Test:       	TestGenerateSnapshotErrors/config_history_mgr_returns_error

(...)

FAIL
coverage: 78.8% of statements
FAIL	github.com/hyperledger/fabric/core/ledger/kvledger	583.226s
  • Reproduce procedure
  1. $ git clone https://github.com/hyperledger/fabric.git fabrictest or $ mv fabric fabrictest
  2. $ cd fabrictest
  3. $ make unit-test
justin-themedium added a commit to kstadium/fabric that referenced this issue Oct 21, 2021
Check the package name not local file name including "fabric/"
on core/ledger/kvledger unit test

core/ledger/kvledger unit-test has been failed on a directory that not "fabric".

Signed-off-by: Justin Yang <justin.yang@themedium.io>
manish-sethi pushed a commit that referenced this issue Oct 21, 2021
Check the package name not local file name including "fabric/"
on core/ledger/kvledger unit test

core/ledger/kvledger unit-test has been failed on a directory that not "fabric".

Signed-off-by: Justin Yang <justin.yang@themedium.io>
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

No branches or pull requests

1 participant