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

fix: Remove flaky time test #250

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions query-creator/create-query/tests/unit/generated-sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,15 +819,15 @@ FROM
`

exports.expectedUserLogSQLresult = `
-- name log.username IN ('[email protected]', '[email protected]') AND log.activity IN ('activity-1', 'activity-2') AND time >= 1704171600 AND time <= 1709528400
-- name log.username IN ('[email protected]', '[email protected]') AND log.activity IN ('activity-1', 'activity-2')
-- type user event log
-- reportType user-event-log
-- usernames: ["[email protected]","[email protected]"]
-- activities: ["activity-1","activity-2"]

SELECT *
FROM "undefined"."logs_by_time" log
WHERE log.username IN ('[email protected]', '[email protected]') AND log.activity IN ('activity-1', 'activity-2') AND time >= 1704171600 AND time <= 1709528400
WHERE log.username IN ('[email protected]', '[email protected]') AND log.activity IN ('activity-1', 'activity-2')
`

exports.expectedNarrowLearnerLogWithNamesSqlResult = `
Expand Down
2 changes: 1 addition & 1 deletion query-creator/create-query/tests/unit/test-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ describe('Query creation unreportable runnable', function () {
describe('Query creation for log data', function () {

it('verifies successful query creation of user log data', async () => {
const generatedSQLresult = await aws.generateUserLogSQL(["[email protected]", "[email protected]"], ["activity-1", "activity-2"], "1/2/2024", "3/4/2024");
const generatedSQLresult = await aws.generateUserLogSQL(["[email protected]", "[email protected]"], ["activity-1", "activity-2"]);
const normalizedGeneratedSQLresult = normalizeSQL(generatedSQLresult);
const normalizedExpectedSQLresult = normalizeSQL(expectedUserLogSQLresult);
expect(normalizedGeneratedSQLresult).to.be.equal(normalizedExpectedSQLresult);
Expand Down
Loading