Add test files and enhance logging in various components
- Introduced test files for the blossom and database packages to improve test coverage and ensure functionality. - Updated logging practices by suppressing unnecessary log outputs during tests to enhance clarity and focus on relevant information. - Refactored error handling in the `handle-message` and `handle-req` functions to avoid logging expected context cancellation errors during shutdown. - Bumped version to v0.25.2 to reflect these updates.
This commit is contained in:
@@ -4,12 +4,11 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/minio/sha256-simd"
|
||||
"github.com/templexxx/xhex"
|
||||
"lol.mleku.dev/chk"
|
||||
"lol.mleku.dev/errorf"
|
||||
"lol.mleku.dev/log"
|
||||
"next.orly.dev/pkg/crypto/ec/schnorr"
|
||||
"github.com/minio/sha256-simd"
|
||||
"next.orly.dev/pkg/encoders/ints"
|
||||
"next.orly.dev/pkg/encoders/kind"
|
||||
"next.orly.dev/pkg/encoders/tag"
|
||||
@@ -399,7 +398,7 @@ eof:
|
||||
//
|
||||
// Call ev.Free() to return the provided buffer to the bufpool afterwards.
|
||||
func (ev *E) UnmarshalJSON(b []byte) (err error) {
|
||||
log.I.F("UnmarshalJSON: '%s'", b)
|
||||
// log.I.F("UnmarshalJSON: '%s'", b)
|
||||
_, err = ev.Unmarshal(b)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ func TestExamplesCache(t *testing.T) {
|
||||
c := bufpool.Get()
|
||||
c = c[:0]
|
||||
c = append(c, b...)
|
||||
log.I.F("c: %s", c)
|
||||
log.I.F("b: %s", b)
|
||||
// log.I.F("c: %s", c)
|
||||
// log.I.F("b: %s", b)
|
||||
ev := New()
|
||||
if _, err = ev.Unmarshal(c); chk.E(err) {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user