Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TEST CODECOV TEMP #388

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ add-copyright:
.linux-test-unit: .coverage
@echo
@echo "==> Running unit tests <=="
$(GO) test -race -coverpkg=antrea.io/theia/plugins/...,antrea.io/theia/pkg/... \
-coverprofile=.coverage/coverage-unit.txt -covermode=atomic \
antrea.io/theia/plugins/... antrea.io/theia/pkg/...
$(GO) test -race -coverpkg=antrea.io/theia/plugins/...,antrea.io/theia/pkg/...,antrea.io/theia/cmd/...,antrea.io/theia/snowflake/cmd/...,antrea.io/theia/snowflake/pkg/...\
-coverprofile=.coverage/coverage-unit.txt -covermode=atomic

.PHONY: tidy
tidy:
Expand Down
20 changes: 10 additions & 10 deletions test/e2e/throughputanomalydetection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func testAnomalyDetectionRetrieve(t *testing.T, data *TestData, connect *sql.DB)
algoNames := []string{"ARIMA", "EWMA", "DBSCAN"}
// agg_type 'podLabel' stands for agg_type 'pod' with pod-label argument
// agg_type 'podName' stands for agg_type 'pod' with pod-name argument
agg_types := []string{"None", "podName", "podLabel", "svc", "external"}
agg_types := []string{"podLabel"}
// Select random algo for the agg_types
aggTypeToAlgoNameMap := make(map[string]string)
for _, agg_type := range agg_types {
Expand Down Expand Up @@ -244,18 +244,17 @@ func testAnomalyDetectionRetrieve(t *testing.T, data *TestData, connect *sql.DB)
poolIdx = 0
for agg_type, algoName := range aggTypeToAlgoNameMap {
poolIdx += 1
if agg_type == "None" {
for _, algo := range algoNames {
algoName = algo
wg.Add(1)
pool <- poolIdx
go executeRetrieveTest(t, data, algoName, agg_type, result_map, assert_variable_map, pool, &wg)
}
} else {
for _, algo := range algoNames {
algoName = algo
wg.Add(1)
pool <- poolIdx
go executeRetrieveTest(t, data, algoName, agg_type, result_map, assert_variable_map, pool, &wg)
}
// } else {
// wg.Add(1)
// pool <- poolIdx
// go executeRetrieveTest(t, data, algoName, agg_type, result_map, assert_variable_map, pool, &wg)
// }
}
wg.Wait()
}
Expand All @@ -266,7 +265,8 @@ func executeRetrieveTest(t *testing.T, data *TestData, algo, agg_type string, re
<-pool
wg.Done()
}()
_, jobName, err := tadrunJob(t, data, algo, agg_type)
stdout, jobName, err := tadrunJob(t, data, algo, agg_type)
fmt.Printf("TUSHAR TESTS JOB: %v, algo: %v, agg_type:%v \n", stdout, algo, agg_type)
require.NoError(t, err)
err = data.podWaitForReady(defaultTimeout, jobName+"-driver", flowVisibilityNamespace)
require.NoError(t, err)
Expand Down
1 change: 1 addition & 0 deletions test/e2e/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ func RunJob(t *testing.T, data *TestData, jobcmd string) (stdout string, jobName
stdout = strings.TrimSuffix(stdout, "\n")
stdoutSlice := strings.Split(stdout, " ")
jobName = stdoutSlice[len(stdoutSlice)-1]

return stdout, jobName, nil
}

Expand Down
Loading