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

Ignore SQLite3 database files generated by parallel testing #37053

Conversation

yahonda
Copy link
Member

@yahonda yahonda commented Aug 27, 2019

Summary

Rails 6.0 introduces parallel testing and the default degree of parallelism is configured based on the number of CPU. refer #34735 #31900

When any minitest executed under the OS where 2 or more CPU available,
SQLite 3 database files are not git-ignored.

Also updated other files which ignores SQLite database files.

  • Steps to reproduce
$ grep processor /proc/cpuinfo | wc -l
6
$ git clone https://github.com/yahonda/rep_ignore_sqlite3_databases.git
$ cd rep_ignore_sqlite3_databases/
$ bin/rails test
$ git status

Expected behavior:

  • No Untracked files:

Actual behavior:

  • SQLite 3 database files appeared
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	db/test.sqlite3-0
	db/test.sqlite3-1
	db/test.sqlite3-2
	db/test.sqlite3-3
	db/test.sqlite3-4
	db/test.sqlite3-5

nothing added to commit but untracked files present (use "git add" to track)
$

Rails 6.0 introduces parallel testing and the default degree of parallelism is configured based on the number of CPU.
refer rails#34735 rails#31900

When any minitest executed under the OS where 2 or more CPU available,
SQLite 3 database files are not git-ignored.

Also updated other files which ignores SQLite database files.

* Steps to reproduce

```
$ git clone https://github.com/yahonda/rep_ignore_sqlite3_databases.git
$ cd rep_ignore_sqlite3_databases/
$ bin/rails test
$ git status
```

* Expected behavior:

- No `Untracked files:`

* Actual behavior:

- SQLite 3 database files appeared

```
$ git status
On branch master
Untracked files:
  (use "git add <file>..." to include in what will be committed)

	db/test.sqlite3-0
	db/test.sqlite3-1
	db/test.sqlite3-2
	db/test.sqlite3-3
	db/test.sqlite3-4
	db/test.sqlite3-5

nothing added to commit but untracked files present (use "git add" to track)
$
```
@carlosantoniodasilva carlosantoniodasilva merged commit 1f325fa into rails:master Aug 27, 2019
carlosantoniodasilva added a commit to carlosantoniodasilva/rails that referenced this pull request Aug 27, 2019
…esting_databases

Ignore SQLite3 database files generated by parallel testing
@yahonda yahonda deleted the ignore_sqlite3_parallel_testing_databases branch August 27, 2019 22:55
jonathanhefner added a commit to jonathanhefner/rails that referenced this pull request Feb 7, 2020
Follow-up to rails#37053.  The `*.sqlite3-*` .gitignore entries added in that
commit subsume previous `*.sqlite3-journal` entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants