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

Functional tests failing (in stable and beta) #2132

Closed
cpswan opened this issue Oct 17, 2024 · 3 comments · Fixed by #2134
Closed

Functional tests failing (in stable and beta) #2132

cpswan opened this issue Oct 17, 2024 · 3 comments · Fixed by #2134
Assignees
Labels
bug Something isn't working

Comments

@cpswan
Copy link
Member

cpswan commented Oct 17, 2024

Describe the bug

❌ test/create_update_key_test.dart: A group of tests to assert on metadata of a key A test to assert of default fields in metadata are populated on creation of a key (failed)
  Expected: <true>
    Actual: <false>
  
  package:matcher                        expect
  test/create_update_key_test.dart 51:7  main.<fn>.<fn>

Steps to reproduce

  1. First I add some changes to a PR
  2. Then I push the changes
  3. And then CI runs tests

Expected behavior

Tests pass

@cpswan cpswan added the bug Something isn't working label Oct 17, 2024
@sitaram-kalluri
Copy link
Member

sitaram-kalluri commented Oct 17, 2024

The functional tests are passing now.

var keyCreationDateTime = DateTime.now().toUtc();
expect(DateTime.parse(atData['metaData']['createdAt']).millisecondsSinceEpoch > keyCreationDateTime.millisecondsSinceEpoch, true);

The failure could be because of the timing issue between the key creation date time and date time in the metadata. Will work on fixing the issue to prevent intermittent failures.

@murali-shris
Copy link
Member

murali-shris commented Oct 17, 2024

The functional tests are passing now.

var keyCreationDateTime = DateTime.now().toUtc();
expect(DateTime.parse(atData['metaData']['createdAt']).millisecondsSinceEpoch > keyCreationDateTime.millisecondsSinceEpoch, true);

The failure could be because of the timing issue between the key creation date time and date time in the metadata. Will work on fixing the issue to prevent intermittent failures.

try replacing the check with
expect(DateTime.parse(atData['metaData']['createdAt']).millisecondsSinceEpoch > DateTime.now().toUtc().millisecondsSinceEpoch);

@murali-shris
Copy link
Member

The functional tests are passing now.

var keyCreationDateTime = DateTime.now().toUtc();
expect(DateTime.parse(atData['metaData']['createdAt']).millisecondsSinceEpoch > keyCreationDateTime.millisecondsSinceEpoch, true);

The failure could be because of the timing issue between the key creation date time and date time in the metadata. Will work on fixing the issue to prevent intermittent failures.

try replacing the check with expect(DateTime.parse(atData['metaData']['createdAt']).millisecondsSinceEpoch > DateTime.now().toUtc());

sorry.this check is incorrect. newest time will have greater value of millisecondsSinceEpoch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants