[PR #9] [MERGED] Run tests in parallel #39

Closed
opened 2026-02-28 01:20:39 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/9
Author: @qba73
Created: 7/31/2022
Status: Merged
Merged: 7/31/2022
Merged by: @tufanbarisyildirim

Base: masterHead: paralleltests


📝 Commits (1)

📊 Changes

13 files changed (+31 additions, -1 deletions)

View changed files

📝 block_test.go (+2 -0)
📝 config_test.go (+1 -0)
📝 directive_test.go (+2 -0)
📝 dumper_test.go (+1 -0)
📝 http_test.go (+1 -0)
📝 include_test.go (+1 -1)
📝 location_test.go (+1 -0)
📝 parser/lexer_test.go (+2 -0)
📝 parser/parser_test.go (+13 -0)
📝 parser/token/token_test.go (+3 -0)
📝 server_test.go (+1 -0)
📝 upstream_server_test.go (+1 -0)
📝 upstream_test.go (+2 -0)

📄 Description

Hi @tufanbarisyildirim, this PR proposes changes to test files to allow parallel test execution.

Testing locally:

➜  gonginx git:(paralleltests) ✗ go test -race ./... -count=1
ok  	github.com/tufanbarisyildirim/gonginx	0.217s
?   	github.com/tufanbarisyildirim/gonginx/examples/adding-server	[no test files]
?   	github.com/tufanbarisyildirim/gonginx/examples/formatting	[no test files]
?   	github.com/tufanbarisyildirim/gonginx/examples/update-directive	[no test files]
ok  	github.com/tufanbarisyildirim/gonginx/parser	0.335s
ok  	github.com/tufanbarisyildirim/gonginx/parser/token	0.160s

Testing locally using make target:

➜  gonginx git:(paralleltests) make test
go test -race -cover /Users/jakub/projects/gonginx/parser/token
ok  	github.com/tufanbarisyildirim/gonginx/parser/token	(cached)	coverage: 100.0% of statements
go test -race -cover /Users/jakub/projects/gonginx/parser
ok  	github.com/tufanbarisyildirim/gonginx/parser	(cached)	coverage: 95.3% of statements
go test -race -cover /Users/jakub/projects/gonginx
ok  	github.com/tufanbarisyildirim/gonginx	(cached)	coverage: 65.7% of statements

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tufanbarisyildirim/gonginx/pull/9 **Author:** [@qba73](https://github.com/qba73) **Created:** 7/31/2022 **Status:** ✅ Merged **Merged:** 7/31/2022 **Merged by:** [@tufanbarisyildirim](https://github.com/tufanbarisyildirim) **Base:** `master` ← **Head:** `paralleltests` --- ### 📝 Commits (1) - [`c5d26e8`](https://github.com/tufanbarisyildirim/gonginx/commit/c5d26e8b1617269fb9b3dea364b165cf62a59780) Run tests in parallel ### 📊 Changes **13 files changed** (+31 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `block_test.go` (+2 -0) 📝 `config_test.go` (+1 -0) 📝 `directive_test.go` (+2 -0) 📝 `dumper_test.go` (+1 -0) 📝 `http_test.go` (+1 -0) 📝 `include_test.go` (+1 -1) 📝 `location_test.go` (+1 -0) 📝 `parser/lexer_test.go` (+2 -0) 📝 `parser/parser_test.go` (+13 -0) 📝 `parser/token/token_test.go` (+3 -0) 📝 `server_test.go` (+1 -0) 📝 `upstream_server_test.go` (+1 -0) 📝 `upstream_test.go` (+2 -0) </details> ### 📄 Description Hi @tufanbarisyildirim, this PR proposes changes to test files to allow parallel test execution. Testing locally: ``` ➜ gonginx git:(paralleltests) ✗ go test -race ./... -count=1 ok github.com/tufanbarisyildirim/gonginx 0.217s ? github.com/tufanbarisyildirim/gonginx/examples/adding-server [no test files] ? github.com/tufanbarisyildirim/gonginx/examples/formatting [no test files] ? github.com/tufanbarisyildirim/gonginx/examples/update-directive [no test files] ok github.com/tufanbarisyildirim/gonginx/parser 0.335s ok github.com/tufanbarisyildirim/gonginx/parser/token 0.160s ``` Testing locally using make target: ``` ➜ gonginx git:(paralleltests) make test go test -race -cover /Users/jakub/projects/gonginx/parser/token ok github.com/tufanbarisyildirim/gonginx/parser/token (cached) coverage: 100.0% of statements go test -race -cover /Users/jakub/projects/gonginx/parser ok github.com/tufanbarisyildirim/gonginx/parser (cached) coverage: 95.3% of statements go test -race -cover /Users/jakub/projects/gonginx ok github.com/tufanbarisyildirim/gonginx (cached) coverage: 65.7% of statements ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 01:20:39 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/gonginx#39
No description provided.