Skip to content

Rework on reactivity unittest#33

Open
illuminist wants to merge 1 commit into
TAPevents:masterfrom
illuminist:master
Open

Rework on reactivity unittest#33
illuminist wants to merge 1 commit into
TAPevents:masterfrom
illuminist:master

Conversation

@illuminist

Copy link
Copy Markdown

Background:
I have a re-implement test tap-i18n-db in javascript which is also tap:i18n independent. In order to verify original functionality, I need to user original unittest in my implementation. The problem is reactivity tests take so long time to run so I reworked them to make them become faster.

What I have done

  • Original reactivity unittest depends on timer to check tracker ( Deps in this case because they are old implementation. In my case, I changed them to Tracker ) which would waste so much time waiting for the timer.
    The new unittest depends on Meteor.subcribe.ready() which will become not ready when tracker become invalidate and back to ready again when new data have arrived.
    The new running time are
    • 490 ms for simple subscription ( originally around 2500 ms )
    • 2096 ms for complex subscription ( originally around 60000 ms )
  • Complex reactivity test cases has been change to pre-generated test cases instead of the original "change-on-the-run" for more readiness.

Disclaimer
I haven't been testing on implementation with tap:i18n, only with mocked tap:i18n because the original one seem to be broken as hell, along with some modification in unittest starter file to include some missing dependencies. I had modified and run this test in Meteor 1.7.0.5. Even though the other part of unittests are also broken because the changes in the last 3-4 years which I have fixed in JS re-implementation. But this rework seem to be pretty useful in general so I submitted this PR.

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.

1 participant