Skip to content

Commit

Permalink
skip some reconstruction
Browse files Browse the repository at this point in the history
  • Loading branch information
ramin committed Jan 15, 2024
1 parent a33d67f commit 771b556
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
go-version: ${{ inputs.go-version }}

- name: run reconstruction tests
run: make test-integration TAGS=reconstruction
run: make test-integration SHORT=true TAGS=reconstruction

sync_tests:
name: Integration Tests Sync
Expand All @@ -111,5 +111,5 @@ jobs:
with:
go-version: ${{ inputs.go-version }}

- name: run reconstruction tests
- name: run sync tests
run: make test-integration TAGS=sync
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ DIR_FULLPATH=$(shell pwd)
versioningPath := "github.com/celestiaorg/celestia-node/nodebuilder/node"
LDFLAGS=-ldflags="-X '$(versioningPath).buildTime=$(shell date)' -X '$(versioningPath).lastCommit=$(shell git rev-parse HEAD)' -X '$(versioningPath).semanticVersion=$(shell git describe --tags --dirty=-dev 2>/dev/null || git rev-parse --abbrev-ref HEAD)'"
TAGS=integration
SHORT=
ifeq (${PREFIX},)
PREFIX := /usr/local
endif
Expand All @@ -14,6 +15,11 @@ else
VERBOSE =
LOG_AND_FILTER =
endif
ifeq ($(SHORT),true)
INTEGRATION_RUN_LENGTH = -short
else
INTEGRATION_RUN_LENGTH =
endif
## help: Get more info on make commands.
help: Makefile
@echo " Choose a command run in "$(PROJECTNAME)":"
Expand Down Expand Up @@ -124,8 +130,8 @@ test-unit-race:

## test-integration: Running /integration tests located in nodebuilder/tests
test-integration:
@echo "--> Running integrations tests -tags=$(TAGS)"
@go test -tags=$(TAGS) ./nodebuilder/tests
@echo "--> Running integrations tests $(VERBOSE) -tags=$(TAGS) $(INTEGRATION_RUN_LENGTH)"
@go test $(VERBOSE) -tags=$(TAGS) $(INTEGRATION_RUN_LENGTH) ./nodebuilder/tests
.PHONY: test-integration

## test-integration-race: Running integration tests with data race detector located in node/tests
Expand Down
8 changes: 8 additions & 0 deletions nodebuilder/tests/reconstruct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ Test-Case: Full Node reconstructs blocks from each other, after unsuccessfully s
block from LN subnetworks. Analog to TestShareAvailable_DisconnectedFullNodes.
*/
func TestFullReconstructFromFulls(t *testing.T) {
if testing.Short() {
t.Skip()
}

light.DefaultSampleAmount = 10 // s
const (
blocks = 10
Expand Down Expand Up @@ -252,6 +256,10 @@ Steps:
9. Check that the FN can retrieve shares from 1 to 20 blocks
*/
func TestFullReconstructFromLights(t *testing.T) {
if testing.Short() {
t.Skip()
}

eds.RetrieveQuadrantTimeout = time.Millisecond * 100
light.DefaultSampleAmount = 20
const (
Expand Down
6 changes: 3 additions & 3 deletions nodebuilder/tests/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
const (
numBlocks = 20
bsize = 16
btime = time.Millisecond * 300
sbtime = time.Millisecond * 300
)

/*
Expand Down Expand Up @@ -47,7 +47,7 @@ func TestSyncAgainstBridge_NonEmptyChain(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout)
t.Cleanup(cancel)

sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime))
sw := swamp.NewSwamp(t, swamp.WithBlockTime(sbtime))
// wait for core network to fill 20 blocks
fillDn := swamp.FillBlocks(ctx, sw.ClientContext, sw.Accounts, bsize, numBlocks)
sw.WaitTillHeight(ctx, numBlocks)
Expand Down Expand Up @@ -140,7 +140,7 @@ func TestSyncAgainstBridge_EmptyChain(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), swamp.DefaultTestTimeout)
t.Cleanup(cancel)

sw := swamp.NewSwamp(t, swamp.WithBlockTime(btime))
sw := swamp.NewSwamp(t, swamp.WithBlockTime(sbtime))
sw.WaitTillHeight(ctx, numBlocks)

// create bridge node and set it as the bootstrapper for the suite
Expand Down

0 comments on commit 771b556

Please sign in to comment.