Skip to content

Commit 80108b6

Browse files
committed
fix: fix the data_generator tests
1 parent 9ac8935 commit 80108b6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/data_generator/datagenerator_test.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -88,26 +88,26 @@ func TestRunDataGeneration(t *testing.T) {
8888
if countCohorts != 5 {
8989
t.Errorf("Expected 5 cohort_definition records, found %d", countCohorts)
9090
}
91-
}
9291

93-
func TestRunDataGeneration2(t *testing.T) {
92+
// second part of the test...added here to avoid running in parallel with part above:
93+
tearDown()
9494
setUp(t)
9595

9696
RunDataGeneration("example_test_data_config")
9797

98-
countCohorts := tests.GetCount(db.GetAtlasDB(), "cohort_definition")
98+
countCohorts = tests.GetCount(db.GetAtlasDB(), "cohort_definition")
9999
if countCohorts != 3 {
100100
t.Errorf("Expected 3 cohort_definition records, found %d", countCohorts)
101101
}
102-
countPersons := tests.GetCount(tests.GetOmopDataSourceForSourceId(tests.GetTestSourceId()), "person")
102+
countPersons = tests.GetCount(tests.GetOmopDataSourceForSourceId(tests.GetTestSourceId()), "person")
103103
if countPersons != 36 {
104104
t.Errorf("Expected 36 persons, found %d", countPersons)
105105
}
106-
countObservations := tests.GetCount(tests.GetOmopDataSourceForSourceId(tests.GetTestSourceId()), "observation")
106+
countObservations = tests.GetCount(tests.GetOmopDataSourceForSourceId(tests.GetTestSourceId()), "observation")
107107
if countObservations != 60 {
108108
t.Errorf("Expected 60 observations, found %d", countObservations)
109109
}
110-
countConcepts := tests.GetCount(tests.GetOmopDataSourceForSourceId(tests.GetTestSourceId()), "concept")
110+
countConcepts = tests.GetCount(tests.GetOmopDataSourceForSourceId(tests.GetTestSourceId()), "concept")
111111
if countConcepts != 11 {
112112
t.Errorf("Expected 11 concepts, found %d", countConcepts)
113113
}

0 commit comments

Comments
 (0)