Skip to content

Commit

Permalink
ci-fix: correct ishard long test directory
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Chen <[email protected]>
  • Loading branch information
Nahemah1022 committed Aug 19, 2024
1 parent fbcb903 commit e36e7a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ test:long:ishard:
script:
- ${SCRIPTS_DIR}/clean_deploy.sh --target-cnt $NUM_TARGET --proxy-cnt $NUM_PROXY --mountpath-cnt $FS_CNT
- sleep 10 # make sure that cluster properly starts
- cd ./tools/ishard; go test -v -timeout=1h -run=^TestIshard
- cd ./cmd/ishard/ishard; go test -v -timeout=10h -run=^TestIshard
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "main"'
when: manual
Expand Down
10 changes: 5 additions & 5 deletions cmd/ishard/ishard/ishard_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,11 +553,7 @@ func TestIshardEKM(t *testing.T) {
fmt.Fprintf(&builder, "\n \"%c-%%d.tar\": [\"^%c.*\"]", letter, letter)
}
builder.WriteString("\n}")
jsonData := []byte(builder.String())
cfg.EKMFlag = config.EKMFlag{
IsSet: true,
JSONBytes: jsonData,
}
cfg.EKMFlag.Set(builder.String())

tlog.Logf("starting ishard, from %s to %s\n", cfg.SrcBck, cfg.DstBck)
isharder, err := ishard.NewISharder(cfg)
Expand All @@ -568,14 +564,18 @@ func TestIshardEKM(t *testing.T) {

shardContents, err := getShardContents(baseParams, dsortedBck)
tassert.CheckFatal(t, err)

var fileCount int
for tarball, files := range shardContents {
for _, fileName := range files {
fileCount++
tassert.Fatalf(
t, tarball[0] == fileName[0],
"fail to categorize by the first character in file names, tarball name %s != file name %s", tarball, fileName,
)
}
}
tassert.Fatalf(t, fileCount == numRecords*numExtensions, "created file count doesn't match, want %d have %d", numRecords*numExtensions, fileCount)
}

func TestIshardParallel(t *testing.T) {
Expand Down

0 comments on commit e36e7a5

Please sign in to comment.