-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
70 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_20799.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
use query_engine_tests::*; | ||
|
||
// before the fix to https://github.com/prisma/prisma/issues/20799, this test would consistently | ||
// run for multiple minutes and crash with an OOM error on a fast desktop machine with 32GB of RAM. | ||
#[test_suite(schema(schema), only(Sqlite))] | ||
mod regression { | ||
fn schema() -> String { | ||
r#" | ||
model Connection { | ||
id Int @id @default(autoincrement()) | ||
uid String @unique | ||
ownerId Int | ||
atlassianOnPremiseOAuthCredentialsId Int? @unique | ||
bitbucketCloudOAuthCredentialsId Int? @unique | ||
genericAppCredentialsId Int? @unique | ||
gitlabOAuthCredentialsId Int? @unique | ||
googleSheetsOAuthCredentialsId Int? @unique | ||
githubOAuthCredentialsId Int? @unique | ||
mondayOAuthCredentialsId Int? @unique | ||
serviceNowOAuthCredentialsId Int? @unique | ||
bitbucketOnPremiseOAuthCredentialsId Int? @unique | ||
salesforceOAuthCredentialsId Int? @unique | ||
tempoCloudOAuthCredentialsId Int? @unique | ||
slackCredentialsId Int? | ||
jsmCloudAssetsApiKeyCredentialsId Int? @unique | ||
googleCalendarOAuthCredentialsId Int? @unique | ||
microsoftOAuthCredentialsId Int? @unique | ||
zoomOAuthCredentialsId Int? @unique | ||
statuspageApiKeyCredentialsId Int? @unique | ||
trelloApiKeyCredentialsId Int? @unique | ||
opsgenieApiKeyCredentialsId Int? @unique | ||
one Int? @unique | ||
two Int? @unique | ||
three Int? @unique | ||
four Int? @unique | ||
five Int? @unique | ||
six Int? @unique | ||
seven Int? @unique | ||
eight Int? @unique | ||
nine Int? @unique | ||
ten Int? @unique | ||
} | ||
"# | ||
.to_owned() | ||
} | ||
|
||
#[connector_test] | ||
async fn repro(runner: Runner) -> TestResult<()> { | ||
let query = r#" | ||
query { | ||
findManyConnection( | ||
where: { | ||
ownerId: 100, | ||
}, | ||
) { id } | ||
} | ||
"#; | ||
runner.query(query).await?.assert_success(); | ||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters