Skip to content

Commit

Permalink
Parallelize the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
josephschorr committed Apr 26, 2022
1 parent b9ea675 commit 0fd5d40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions proto/authzed/api/validation_test/tuples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ func TestV0CoreObjectValidity(t *testing.T) {
for _, relation := range relations {
testName := fmt.Sprintf("%s:%s#%s@%s", ns.name, objectID.name, relation.name, subjectID.name)
t.Run(testName, func(t *testing.T) {
t.Parallel()

require := require.New(t)

v0ObjectValid := ns.valid && objectID.valid && (relation.validity == alwaysValid ||
Expand Down Expand Up @@ -267,6 +269,8 @@ func TestV1CoreObjectValidity(t *testing.T) {
for _, relation := range relations {
testName := fmt.Sprintf("%s:%s#%s@%s", ns.name, objectID.name, relation.name, subjectID.name)
t.Run(testName, func(t *testing.T) {
t.Parallel()

require := require.New(t)

objRef := &v1.ObjectReference{
Expand Down
2 changes: 2 additions & 0 deletions v0/flatten_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ func TestFlatten(t *testing.T) {

for _, tc := range testCases {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()

var flattened userSet = make(map[string]struct{})
flattened.add(flatten(tc.tree)...)

Expand Down

0 comments on commit 0fd5d40

Please sign in to comment.