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

test: Refactor time tests #1880

Merged
merged 1 commit into from
Oct 20, 2023
Merged

test: Refactor time tests #1880

merged 1 commit into from
Oct 20, 2023

Conversation

joc-a
Copy link
Collaborator

@joc-a joc-a commented Oct 19, 2023

  • Move testCurrentDateTimeFunction from JodaTimeDefaultsTest to JodaTimeTests
  • Rewrite testDefaultCurrentDateTime in JodaTimeDefaultsTest
  • Add testDefaultCurrentDateTime to Java and Kotlin tests

- Move testCurrentDateTimeFunction from JodaTimeDefaultsTest to JodaTimeTests
- Rewrite testDefaultCurrentDateTime in JodaTimeDefaultsTest
- Add testDefaultCurrentDateTime to Java and Kotlin tests
@joc-a joc-a marked this pull request as ready for review October 19, 2023 14:39
@joc-a joc-a requested review from e5l and bog-walk October 19, 2023 14:39
get() =
if (TransactionManager.isInitialized() && TransactionManager.currentOrNull() != null) {
currentDialectTest
} else null
Copy link
Member

Choose a reason for hiding this comment

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

Not about the PR, but I'm confused about our Detekt GH action.

Based on the MultiLineIfElse setting in detekt-config, shouldn't this line be disallowed? It's flagged in the IDE.

Copy link
Member

Choose a reason for hiding this comment

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

I would also make an extension for this condition

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not about the PR, but I'm confused about our Detekt GH action.

Based on the MultiLineIfElse setting in detekt-config, shouldn't this line be disallowed? It's flagged in the IDE.

This is in the exposed-tests module, which is excluded in the detekt GitHub action. I do have it on my to-do list to remove all the detekt warnings in that module at some point and include it in the GitHub action, but I'll create an issue for it.

Copy link
Member

Choose a reason for hiding this comment

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

That's on me. I should've realised that code wasn't a part of any datetime module.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would also make an extension for this condition

I'll work on this in the next PR for refactoring some code in the exposed-tests module.

@e5l
Copy link
Member

e5l commented Oct 20, 2023

LGTM

@joc-a joc-a merged commit ec431aa into main Oct 20, 2023
5 checks passed
@joc-a joc-a deleted the joc/refactor-time-tests branch October 20, 2023 12:34
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.

3 participants