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

[MOBL-1399] Events module rewrite in Kotlin language #363

Merged
merged 49 commits into from
Sep 16, 2024

Conversation

rahulrvp
Copy link
Collaborator

@rahulrvp rahulrvp commented Jul 24, 2024

The event module is rewritten using Kotlin for an improved structure and performance. This code is covered with test cases.

@rahulrvp rahulrvp self-assigned this Jul 24, 2024
Copy link

@ketanshikharebsft ketanshikharebsft left a comment

Choose a reason for hiding this comment

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

LGTM


return result;
BlueshiftNetworkRepositoryImpl networkRepository = new BlueshiftNetworkRepositoryImpl();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If the line crashes, the catch block will be able to catch the exception and print the log.

BulkEventManager.enqueueBulkEvents(context);
// Sync the http request queue.
RequestQueue.getInstance().sync(context);
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Keeping a flag to check if the queue was emptied before is a bit tricky and won't give accurate answer all the time. Both these calls have internal checks to make sure we are not running into expensive operations if the queue is empty.

fun setDatacenter_whenSetToEU_shouldReturnCorrectURLForAllAPIsWithEUBaseUrl() {
BlueshiftAPI.setDatacenter(BlueshiftAPI.Datacenter.EU)

val baseUrlForUS = "https://api.eu.getblueshift.com/"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fix the naming

@rahulrvp rahulrvp marked this pull request as ready for review September 16, 2024 18:48
@rahulrvp rahulrvp merged commit e164124 into main Sep 16, 2024
1 check passed
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