-
Notifications
You must be signed in to change notification settings - Fork 541
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
Fixes part of #1433: Including Console Logger into Oppia Logger #3104
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach LGTM, however there seems to be a build error due to which domain tests are failing. Can you check that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving this for codeowner files only.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my code owners files LGTM
@vinitamurthi PTAL now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@BenHenning can you confirm the changes and merge this PR? Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Arjupta. The implementation LGTM. However, I noticed you haven't added tests for the console logger methods in the OppiaLoggerTest file. Is there something I'm missing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Arjupta. Had just one comment, but I other agree with @Sarthak2601's earlier comment regarding tests: we should make sure the new functionality being added to OppiaLogger
is being tested.
domain/src/main/java/org/oppia/android/domain/oppialogger/OppiaLogger.kt
Outdated
Show resolved
Hide resolved
I too agree that we should encorporate tests for newly added implementations. But the only job of oppia logger here is to call the public methods that are defined in Console Logger. This is similar to calling the |
Makes sense, but the only difference here is that Console Logger doesn't have tests of its own whereas the Analytics Controller does. We can make use of the fake implementation pattern to achieve this. Deferring to @BenHenning here. |
@vinitamurthi can you check if these tests Looks good to you. @BenHenning might be unavailable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests LGTM!
@BenHenning PTAL |
SGTM. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Arjupta! I think the new tests look quite good. Just had a few comments.
domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt
Outdated
Show resolved
Hide resolved
domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt
Outdated
Show resolved
Hide resolved
@BenHenning can you look at these tests. I don't know why applying the sugested changes is creating such havoc. Also i was not able to run the OppiaLogger Test because of this issue.
|
The complete log is like this
|
@BenHenning PTAL. The tests are passing now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Dismissing as per chat this can be approved now.
Explanation
Fixes part of #1433: Restructure the Logger
Using OppiaLogger as the central logging tool
Few files stil depend on Console Logger due to folllowing reasons -
Circular Dependency Graph
Module not depends on domain
Checklist