-
Notifications
You must be signed in to change notification settings - Fork 62
save test outputs from failed GitHub Actions #546
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
Changes from all commits
9c55ae6
88610c9
b10dcfb
17f5ead
f5255cc
09405d6
6a95893
69b2bf0
8a9c27d
a76cfcb
69b3671
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,7 +189,7 @@ mod test { | |
|
|
||
| #[tokio::test] | ||
| async fn test_organization() { | ||
| let logctx = dev::test_setup_log("test_database"); | ||
| let logctx = dev::test_setup_log("test_organization"); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated typo in the log file name that I found while doing this. |
||
| let mut db = dev::test_setup_database(&logctx.log).await; | ||
| let (opctx, datastore) = | ||
| crate::db::datastore::datastore_test(&logctx, &db).await; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -572,7 +572,14 @@ impl Drop for CockroachInstance { | |
| } | ||
| #[allow(unused_must_use)] | ||
| if let Some(temp_dir) = self.temp_dir.take() { | ||
| temp_dir.close(); | ||
| /* | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is mentioned in the PR comments: we now deliberately save the database directory if you don't explicitly clean it up after a successful test. |
||
| * Do NOT clean up the temporary directory in this case. | ||
| */ | ||
| let path = temp_dir.into_path(); | ||
| eprintln!( | ||
| "WARN: temporary directory leaked: {}", | ||
| path.display() | ||
| ); | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -1239,13 +1246,13 @@ mod test { | |
| */ | ||
| #[tokio::test] | ||
| async fn test_database_concurrent() { | ||
| let db1 = new_builder() | ||
| let mut db1 = new_builder() | ||
| .build() | ||
| .expect("failed to create starter for the first database") | ||
| .start() | ||
| .await | ||
| .expect("failed to start first database"); | ||
| let db2 = new_builder() | ||
| let mut db2 = new_builder() | ||
| .build() | ||
| .expect("failed to create starter for the second database") | ||
| .start() | ||
|
|
@@ -1274,6 +1281,9 @@ mod test { | |
| client2.query("SELECT v FROM foo", &[]).await.expect("list rows"); | ||
| assert_eq!(rows.len(), 0); | ||
| client2.cleanup().await.expect("second connection closed ungracefully"); | ||
|
|
||
| db1.cleanup().await.expect("failed to clean up first database"); | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These tests always should have been cleaning up the database instead of relying on the best-effort |
||
| db2.cleanup().await.expect("failed to clean up second database"); | ||
| } | ||
|
|
||
| /* Success case for make_pg_config() */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why the sha rather than a version (which requires a comment) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how well-founded it is, but following the advice in https://julienrenaux.fr/2019/12/20/github-actions-security-risk/.