Skip to content

Add tests for RibEvents buffer size configuration - #642

Merged
psteiger merged 1 commit into
mainfrom
ribevents
Sep 15, 2025
Merged

psteiger merged 1 commit into
mainfrom
ribevents

Conversation

@psteiger

Copy link
Copy Markdown
Contributor

No description provided.

@psteiger
psteiger force-pushed the ribevents branch 2 times, most recently from 6603976 to 24ed82f Compare October 14, 2024 09:37
/**
* Sets the extra buffer capacity for [routerEventsFlow] and [ribActionEventsFlow].
*
* This function must be called on the main thread, and before any usage of:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What will happen if this isn't true? How can we guarantee it's called before?

@psteiger psteiger Oct 14, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tyvsmith

What will happen if this isn't true?

Then, the original value (UNLIMITED) will be used at the moment someone calls one of the RibEvents flow / observable.

How can we guarantee it's called before?

I propose we just do it on our Application.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the earliest we can safely fetch a param? Do we ever call this prior?

@psteiger psteiger Oct 14, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@tyvsmith

What's the earliest we can safely fetch a param?

It seems we'll just have to bite that first session with some default value, and have the new configuration for the next app starts.

Do we ever call this prior?

No, I don't think there's any access to RibEvents flow before Application.onCreate. AFAIK only ContentProvider can run before, and we don't have any touching RibEvents.

@psteiger

Copy link
Copy Markdown
Contributor Author

Superseded by #653

@psteiger psteiger closed this Sep 15, 2025
@psteiger psteiger reopened this Sep 15, 2025
@psteiger psteiger changed the title [DO_NOT_MERGE] Make RibEvents' MutableSharedFlows buffers configurable. Add tests for RibEvents buffer size configuration Sep 15, 2025
@psteiger

Copy link
Copy Markdown
Contributor Author

Reopening this PR to land the unit test (although @ignored)

@psteiger
psteiger merged commit d20a015 into main Sep 15, 2025
5 of 6 checks passed
@psteiger
psteiger deleted the ribevents branch September 15, 2025 22:43
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.

2 participants