Skip to content

Conversation

johnmasking
Copy link
Member

Fixes #

Changes proposed in this pull request:

  • robust get recent Notifications
  • robust explore posts
  • robust get all posts
  • robust get all posts for creator
  • robust get all posts for following
  • robust get all reactions for post
  • robust get all notifications

@MaskingTechnology/comify

@johnmasking johnmasking linked an issue Oct 28, 2024 that may be closed by this pull request

it('should give the valid posts only', async () =>
{
await remove(REQUESTERS.CREATOR1, VALUES.IDS.POST_RATED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This remove call modifies the test fixtures to fit the test assertions below, basically saying that the fixtures do not support this test scenario. Instead of calling the remove function, we need to update the fixtures.

describe('domain/notification/getallAggregated', () =>
{
it('should give all posts for the requester', async () =>
it('should give all posts for the requester2', async () =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed before, this description should tell what scenario is tested. Getting the posts (notifications?) for requester 2 doesn't say anything. It should be clear what's wrong if this test case fails.

describe('domain/notification/getallAggregated', () =>
{
it('should give all posts for the requester', async () =>
it('should give all notifications for the requester2', async () =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('should give all notifications for the requester2', async () =>
it('should give all notifications under normal circumstances', async () =>

The specific requester doesn't matter because it's fixture related, and is not a part of what we're testing.

expect(notification3.relation.following.id).toBe(VALUES.IDS.CREATOR2);
});

it('should give only the notifications without aggregation errors for requester1', async () =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('should give only the notifications without aggregation errors for requester1', async () =>
it('should filter out deleted notifications without aggregation errors', async () =>

The specific requester doesn't matter because it's fixture related, and is not a part of what we're testing.

Copy link

@petermasking petermasking merged commit e2d035f into main Nov 22, 2024
5 checks passed
@petermasking petermasking deleted the 343-aggregation-resilience branch November 22, 2024 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aggregation resilience

2 participants