Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
yjs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sweng-group-15
yjs
Commits
7bd8e813
Commit
7bd8e813
authored
8 years ago
by
Kevin Jahns
Browse files
Options
Downloads
Patches
Plain Diff
fix test verifier
parent
34f365cd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/SpecHelper.js
+8
-0
8 additions, 0 deletions
src/SpecHelper.js
with
8 additions
and
0 deletions
src/SpecHelper.js
+
8
−
0
View file @
7bd8e813
...
...
@@ -121,6 +121,10 @@ function * applyTransactions (relAmount, numberOfTransactions, objects, users, t
// There will be an artificial delay until ops can be executed by the type,
// therefore, operations of the database will be (pre)transformed until user operations arrive
yield
(
function
simulateConcurrentUserInteractions
(
type
)
{
if
(
!
(
type
instanceof
Y
.
utils
.
CustomType
)
&&
type
.
y
instanceof
Y
.
utils
.
CustomType
)
{
// usually we expect type to be a custom type. But in YXml we share an object {y: YXml, dom: Dom} instead
type
=
type
.
y
}
if
(
type
.
eventHandler
.
awaiting
===
0
&&
type
.
eventHandler
.
_debuggingAwaiting
!==
true
)
{
type
.
eventHandler
.
awaiting
=
1
type
.
eventHandler
.
_debuggingAwaiting
=
true
...
...
@@ -156,6 +160,10 @@ function * applyTransactions (relAmount, numberOfTransactions, objects, users, t
}
function
fixAwaitingInType
(
type
)
{
if
(
!
(
type
instanceof
Y
.
utils
.
CustomType
)
&&
type
.
y
instanceof
Y
.
utils
.
CustomType
)
{
// usually we expect type to be a custom type. But in YXml we share an object {y: YXml, dom: Dom} instead
type
=
type
.
y
}
return
new
Promise
(
function
(
resolve
)
{
type
.
os
.
whenTransactionsFinished
().
then
(
function
()
{
// _debuggingAwaiting artificially increases the awaiting property. We need to make sure that we only do that once / reverse the effect once
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment