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

improve test coverage #358

Open
quan8 opened this issue Oct 18, 2019 · 1 comment
Open

improve test coverage #358

quan8 opened this issue Oct 18, 2019 · 1 comment

Comments

@quan8
Copy link
Collaborator

@quan8 quan8 commented Oct 18, 2019

Description:
Need to improve test coverage. There are files that are unused or not being tested or need more tests.

===
unused

metrics/file.go
poset/election/debug.go
poset/event.go
utils/checkpid.go
utils/scheme.go
utils/util.go
utils/spin_lock.go

=====
Not tested

cmd/accountcmd.go
cmd/consolecmd.go
cmd/emitter.go
evm_core/chain_makers.go
evm_core/evm.go
evm_core/gaspool.go ?concurrency safe?
gossip/ethapi_backend.go
packs_downloader/packs_downloader.go
gossip/store_tx_position.go
kvdb/table/reflect.go
inter/time.go

===
more testing required

gossip/api.go
gossip/serverpool.go
gossip/enr_entry.go

@SamuelMarks

This comment has been minimized.

Copy link
Collaborator

@SamuelMarks SamuelMarks commented Nov 15, 2019

Agreed, higher test coverage would be good. Running on latest scope3 0da398d gives 20.318% test coverage, specifically:

?   	github.com/Fantom-foundation/go-lachesis/cmd/cmdtest	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/cmd/lachesis	24.739s	coverage: 1.8%
ok  	github.com/Fantom-foundation/go-lachesis/cmd/tx-storm	1.708s	coverage: 1.2%
?   	github.com/Fantom-foundation/go-lachesis/cmd/tx-storm/meta	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/common	0.011s	coverage: 100.0%
?   	github.com/Fantom-foundation/go-lachesis/common/bigendian	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/common/littleendian	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/common/prque	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/crypto	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/debug	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/ethapi	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/event_check	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/event_check/basic_check	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/event_check/epoch_check	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/event_check/heavy_check	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/event_check/parents_check	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/evm_core	6.514s	coverage: 39.7%
ok  	github.com/Fantom-foundation/go-lachesis/gossip	2.489s	coverage: 38.7%
?   	github.com/Fantom-foundation/go-lachesis/gossip/fetcher	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/gossip/gasprice	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/gossip/occured_txs	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/gossip/ordering	0.031s	coverage: 9.8%
ok  	github.com/Fantom-foundation/go-lachesis/gossip/packs_downloader	0.122s	coverage: 4.3%
?   	github.com/Fantom-foundation/go-lachesis/hash	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/integration	23.533s	coverage: 35.9%
ok  	github.com/Fantom-foundation/go-lachesis/inter	0.036s	coverage: 54.5%
ok  	github.com/Fantom-foundation/go-lachesis/inter/ancestor	0.041s	coverage: 26.0%
?   	github.com/Fantom-foundation/go-lachesis/inter/idx	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/inter/pos	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/kvdb	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/kvdb/devnulldb	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/kvdb/fallible	0.012s	coverage: 6.5%
ok  	github.com/Fantom-foundation/go-lachesis/kvdb/flushable	3.178s	coverage: 39.9%
?   	github.com/Fantom-foundation/go-lachesis/kvdb/leveldb	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/kvdb/memorydb	0.007s	coverage: 9.5%
?   	github.com/Fantom-foundation/go-lachesis/kvdb/no_key_is_err	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/kvdb/table	0.225s	coverage: 23.3%
?   	github.com/Fantom-foundation/go-lachesis/lachesis	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/lachesis/genesis	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/logger	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/metrics/prometheus	[no test files]
?   	github.com/Fantom-foundation/go-lachesis/params	[no test files]
ok  	github.com/Fantom-foundation/go-lachesis/poset	5.376s	coverage: 55.6%
ok  	github.com/Fantom-foundation/go-lachesis/poset/election	0.039s	coverage: 27.8%
ok  	github.com/Fantom-foundation/go-lachesis/topicsdb	0.027s	coverage: 35.7%
ok  	github.com/Fantom-foundation/go-lachesis/utils	0.051s	coverage: 17.8%
ok  	github.com/Fantom-foundation/go-lachesis/utils/fast	0.011s	coverage: 58.5%
ok  	github.com/Fantom-foundation/go-lachesis/vector	2.394s	coverage: 41.1%
?   	github.com/Fantom-foundation/go-lachesis/version	[no test files]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.