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

Update kotlintest #912

Merged
merged 92 commits into from Jan 14, 2019

Conversation

Projects
None yet
7 participants
@AdrianRaFo
Copy link
Contributor

AdrianRaFo commented Jun 26, 2018

Fixes #854
Fixes #855

Upgrade KotlinTest version to 3.1.5 adding the test parallelism.

This new version replaces the generate() method for:

  • random() returning a list of random values.
  • constant() returning the constant values of the Generator.

The parallelism is added on the gradle.properties with the kotlintest.parallelism key

AdrianRaFo added some commits Jun 12, 2018

@AdrianRaFo AdrianRaFo requested a review from arrow-kt/maintainers Jun 26, 2018

Merge remote-tracking branch 'origin/master' into arf-854-update-kotl…
…intest

# Conflicts:
#	infographic/arrow-infographic.txt
#	modules/effects/arrow-effects-kotlinx-coroutines/build.gradle
#	modules/effects/arrow-effects-kotlinx-coroutines/src/test/kotlin/arrow/effects/DeferredTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/instances/EachInstanceTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/instances/SetInstanceTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/EitherTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/ListTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/MapTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/NonEmptyListInstancesTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/OptionTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/SetTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/StringTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/TryTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/TupleTest.kt
#	modules/optics/arrow-optics/src/test/kotlin/arrow/optics/std/ValidatedTest.kt

pakoito and others added some commits Jun 27, 2018

Merge remote-tracking branch 'origin/master' into arf-854-update-kotl…
…intest

# Conflicts:
#	modules/core/arrow-test/src/main/kotlin/arrow/test/generators/Generators.kt
#	modules/core/arrow-test/src/main/kotlin/arrow/test/laws/RecursiveLaws.kt
Merge remote-tracking branch 'origin/master' into arf-854-update-kotl…
…intest

# Conflicts:
#	modules/core/arrow-data/src/test/kotlin/arrow/data/SequenceKTest.kt
@raulraja

This comment has been minimized.

Copy link
Member

raulraja commented Jul 15, 2018

@AdrianRaFo what's the status of this PR?

@AdrianRaFo

This comment has been minimized.

Copy link
Contributor Author

AdrianRaFo commented Jul 15, 2018

I need some help to fix the laws because some of them are using generators and I don't know how to fix them properly

@raulraja

This comment has been minimized.

Copy link
Member

raulraja commented Jul 15, 2018

Feel free to post any questions about it here.

@AdrianRaFo

This comment has been minimized.

Copy link
Contributor Author

AdrianRaFo commented Jul 18, 2018

Basically, I don't know how to fix the OutOfMemoryError caused by stack-safe laws, so if any of you can find something wrong in the changes or have any idea about how to start to fix it, it could be really helpful.

@pakoito

This comment has been minimized.

Copy link
Member

pakoito commented Jul 18, 2018

@AdrianRaFo which laws are these? The ones on the travis logs?

@AdrianRaFo

This comment has been minimized.

Copy link
Contributor Author

AdrianRaFo commented Jul 18, 2018

Yes, MonadLaws for stack-safety , for-comprehension and paralellism

Merge remote-tracking branch 'origin/master' into arf-854-update-kotl…
…intest

# Conflicts:
#	infographic/arrow-infographic.txt
#	modules/core/arrow-data/src/test/kotlin/arrow/data/TryTest.kt
@AdrianRaFo

This comment has been minimized.

Copy link
Contributor Author

AdrianRaFo commented Jan 13, 2019

@pakoito Most of the this replacement are due to forAll method in the new version of Kotlintest receives a TestContext.(), so the this do reference to TestContext now

@pakoito

This comment has been minimized.

Copy link
Member

pakoito commented Jan 13, 2019

@AdrianRaFo oh, I see that makes sense.

I cannot remember why the Try#combine is the way it is, I just remember we changed it for a reason. As I cannot remember the reason, change it and if we ever remember we can fix it.

@AdrianRaFo

This comment has been minimized.

Copy link
Contributor Author

AdrianRaFo commented Jan 13, 2019

@pakoito let me know if those last changes work for you 😉

Merge remote-tracking branch 'origin/master' into arf-854-update-kotl…
…intest

# Conflicts:
#	modules/core/arrow-test/src/main/kotlin/arrow/test/laws/AsyncLaws.kt
#	modules/effects/arrow-effects-data/src/test/kotlin/arrow/effects/IOTest.kt
#	modules/effects/arrow-effects-data/src/test/kotlin/arrow/effects/KindConnectionTests.kt
#	modules/effects/arrow-effects-data/src/test/kotlin/arrow/effects/MVarTest.kt
#	modules/effects/arrow-effects-data/src/test/kotlin/arrow/effects/PromiseTest.kt
#	modules/effects/arrow-effects-data/src/test/kotlin/arrow/effects/SemaphoreTest.kt
#	modules/effects/arrow-effects-extensions/src/test/kotlin/arrow/effects/RefTest.kt
#	modules/effects/arrow-effects-kotlinx-coroutines-data/src/test/kotlin/arrow/effects/coroutines/DeferredKTest.kt
#	modules/effects/arrow-effects-kotlinx-coroutines/build.gradle
#	modules/effects/arrow-effects-reactor/build.gradle
#	modules/effects/arrow-effects-rx2-data/src/test/kotlin/arrow/effects/ObservableKTests.kt
@nomisRev

This comment has been minimized.

Copy link
Member

nomisRev commented Jan 13, 2019

the re-capcutes of this in variables don't make me very happy

+1 on this.

@AdrianRaFo I'll look into merging master and resolving the conflicts from the Concurrent branch.

nomisRev added some commits Jan 14, 2019

@AdrianRaFo

This comment has been minimized.

Copy link
Contributor Author

AdrianRaFo commented Jan 14, 2019

@pakoito @JorgeCastilloPrz @raulraja @nomisRev Any last review, or should I merge?

@JorgeCastilloPrz

This comment has been minimized.

Copy link
Member

JorgeCastilloPrz commented Jan 14, 2019

It's fine for me. If @nomisRev is alright with your later answer all should be good to go (paco already approved also)

@nomisRev

This comment has been minimized.

Copy link
Member

nomisRev commented Jan 14, 2019

@JorgeCastilloPrz I discussed a small with @AdrianRaFo on Slack.

To add an overload to LensLaws to breaking existing code, and to avoid boilerplate-y Gen.constant.

@AdrianRaFo AdrianRaFo merged commit 66dcb74 into master Jan 14, 2019

4 checks passed

ci/bitrise/b4ac6a91e50a5bdd/pr Passed - arrow
Details
ci/bitrise/b4ac6a91e50a5bdd/push Passed - arrow
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@AdrianRaFo AdrianRaFo deleted the arf-854-update-kotlintest branch Jan 14, 2019

@pakoito

This comment has been minimized.

Copy link
Member

pakoito commented Jan 14, 2019

💛 thanks for taking this over, I know it was a lot of work :D

@sksamuel

This comment has been minimized.

Copy link
Collaborator

sksamuel commented Jan 14, 2019

Well done on the upgrade to KotlintTest 3.1.
I hope you liked the framework.

@AdrianRaFo

This comment has been minimized.

Copy link
Contributor Author

AdrianRaFo commented Jan 14, 2019

It works pretty good 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.