Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ build-go:
go build ./...

test:
RUST_BACKTRACE=1 go test -v ./api ./types .
RUST_BACKTRACE=1 go test -v

test-safety:
GODEBUG=cgocheck=2 go test -race -v -count 1 ./api
GODEBUG=cgocheck=2 go test -race -v -count 1

# Creates a release build in a containerized build environment of the static library for Alpine Linux (.a)
release-build-alpine:
Expand Down
16 changes: 8 additions & 8 deletions api/lib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func TestGetMetrics(t *testing.T) {
assert.Equal(t, &types.Metrics{
HitsFsCache: 1,
ElementsMemoryCache: 1,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)

// Instantiate 2
Expand All @@ -223,7 +223,7 @@ func TestGetMetrics(t *testing.T) {
HitsMemoryCache: 1,
HitsFsCache: 1,
ElementsMemoryCache: 1,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)

// Pin
Expand All @@ -238,8 +238,8 @@ func TestGetMetrics(t *testing.T) {
HitsFsCache: 1,
ElementsPinnedMemoryCache: 1,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 5549819,
SizeMemoryCache: 5549819,
SizePinnedMemoryCache: 5622877,
SizeMemoryCache: 5622877,
}, metrics)

// Instantiate 3
Expand All @@ -256,8 +256,8 @@ func TestGetMetrics(t *testing.T) {
HitsFsCache: 1,
ElementsPinnedMemoryCache: 1,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 5549819,
SizeMemoryCache: 5549819,
SizePinnedMemoryCache: 5622877,
SizeMemoryCache: 5622877,
}, metrics)

// Unpin
Expand All @@ -274,7 +274,7 @@ func TestGetMetrics(t *testing.T) {
ElementsPinnedMemoryCache: 0,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 0,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)

// Instantiate 4
Expand All @@ -292,7 +292,7 @@ func TestGetMetrics(t *testing.T) {
ElementsPinnedMemoryCache: 0,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 0,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)
}

Expand Down
Binary file modified api/testdata/hackatom.wasm
Binary file not shown.
Binary file modified api/testdata/ibc_reflect.wasm
Binary file not shown.
Binary file modified api/testdata/queue.wasm
Binary file not shown.
Binary file modified api/testdata/reflect.wasm
Binary file not shown.
16 changes: 8 additions & 8 deletions lib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func TestGetMetrics(t *testing.T) {
assert.Equal(t, &types.Metrics{
HitsFsCache: 1,
ElementsMemoryCache: 1,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)

// Instantiate 2
Expand All @@ -149,7 +149,7 @@ func TestGetMetrics(t *testing.T) {
HitsMemoryCache: 1,
HitsFsCache: 1,
ElementsMemoryCache: 1,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)

// Pin
Expand All @@ -164,8 +164,8 @@ func TestGetMetrics(t *testing.T) {
HitsFsCache: 1,
ElementsPinnedMemoryCache: 1,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 5549819,
SizeMemoryCache: 5549819,
SizePinnedMemoryCache: 5622877,
SizeMemoryCache: 5622877,
}, metrics)

// Instantiate 3
Expand All @@ -183,8 +183,8 @@ func TestGetMetrics(t *testing.T) {
HitsFsCache: 1,
ElementsPinnedMemoryCache: 1,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 5549819,
SizeMemoryCache: 5549819,
SizePinnedMemoryCache: 5622877,
SizeMemoryCache: 5622877,
}, metrics)

// Unpin
Expand All @@ -201,7 +201,7 @@ func TestGetMetrics(t *testing.T) {
ElementsPinnedMemoryCache: 0,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 0,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)

// Instantiate 4
Expand All @@ -220,6 +220,6 @@ func TestGetMetrics(t *testing.T) {
ElementsPinnedMemoryCache: 0,
ElementsMemoryCache: 1,
SizePinnedMemoryCache: 0,
SizeMemoryCache: 5549819,
SizeMemoryCache: 5622877,
}, metrics)
}
Loading