Skip to content

Commit

Permalink
Reduce abuse amount and parallelism in abuse test (#7996)
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-har authored Jul 18, 2024
1 parent ca47382 commit 0fced48
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions esti/lakectl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ func TestLakectlBranchProtection(t *testing.T) {
RunCmdAndVerifySuccessWithFile(t, Lakectl()+" branch-protect list lakefs://"+repoName, false, "lakectl_branch_protection_list.term", vars)
}

// TestLakectlAbuse runs a series of abuse commands to test the functionality of lakectl abuse (not in order to test how lakeFS handles abuse)
func TestLakectlAbuse(t *testing.T) {
repoName := generateUniqueRepositoryName()
storage := generateUniqueStorageNamespace(repoName)
Expand All @@ -884,6 +885,10 @@ func TestLakectlAbuse(t *testing.T) {
require.NoError(t, err)
require.NoError(t, f.Close())

const (
abuseAmount = 50
abuseParallelism = 3
)
tests := []struct {
Cmd string
Amount int
Expand All @@ -894,30 +899,34 @@ func TestLakectlAbuse(t *testing.T) {
Amount: 10,
},
{
Cmd: "create-branches",
Amount: 1000,
Cmd: "create-branches",
Amount: abuseAmount,
AdditionalArgs: fmt.Sprintf("--parallelism %d", abuseParallelism),
},
{
Cmd: "link-same-object",
Amount: 1000,
Cmd: "link-same-object",
Amount: abuseAmount,
AdditionalArgs: fmt.Sprintf("--parallelism %d", abuseParallelism),
},
{
Cmd: "list",
Amount: 1000,
Cmd: "list",
Amount: abuseAmount,
AdditionalArgs: fmt.Sprintf("--parallelism %d", abuseParallelism),
},
{
Cmd: "random-read",
Amount: 1000,
AdditionalArgs: "--from-file " + f.Name(),
Amount: abuseAmount,
AdditionalArgs: fmt.Sprintf("--parallelism %d --from-file %s", abuseParallelism, f.Name()),
},
{
Cmd: "random-delete",
Amount: 1000,
AdditionalArgs: "--from-file " + f.Name(),
Amount: abuseAmount,
AdditionalArgs: fmt.Sprintf("--parallelism %d --from-file %s", abuseParallelism, f.Name()),
},
{
Cmd: "random-write",
Amount: 1000,
Cmd: "random-write",
Amount: abuseAmount,
AdditionalArgs: fmt.Sprintf("--parallelism %d", abuseParallelism),
},
}
for _, tt := range tests {
Expand Down

0 comments on commit 0fced48

Please sign in to comment.