fix remaining random tests

This commit is contained in:
Kevin Jahns
2019-04-09 00:31:17 +02:00
parent e1a9f314a7
commit 12bcc4d080
11 changed files with 153 additions and 137 deletions

View File

@@ -20,9 +20,12 @@ import * as syncProtocol from 'y-protocols/sync.js'
*/
const afterTransaction = (y, transaction) => {
y.mMux(() => {
const encoder = encoding.createEncoder()
syncProtocol.writeUpdate(encoder, transaction.updateMessage)
broadcastMessage(y, encoding.toBuffer(encoder))
const m = transaction.updateMessage
if (m !== null) {
const encoder = encoding.createEncoder()
syncProtocol.writeUpdate(encoder, m)
broadcastMessage(y, encoding.toBuffer(encoder))
}
})
}

View File

@@ -366,7 +366,6 @@ export const testRepeatGeneratingYarrayTests300 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests400 = tc => {
t.skip(!t.production)
applyRandomTests(tc, arrayTransactions, 400)
}
@@ -374,7 +373,6 @@ export const testRepeatGeneratingYarrayTests400 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests500 = tc => {
t.skip(!t.production)
applyRandomTests(tc, arrayTransactions, 500)
}
@@ -382,7 +380,6 @@ export const testRepeatGeneratingYarrayTests500 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests600 = tc => {
t.skip(!t.production)
applyRandomTests(tc, arrayTransactions, 600)
}
@@ -390,7 +387,6 @@ export const testRepeatGeneratingYarrayTests600 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests1000 = tc => {
t.skip(!t.production)
applyRandomTests(tc, arrayTransactions, 1000)
}
@@ -398,7 +394,6 @@ export const testRepeatGeneratingYarrayTests1000 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests1800 = tc => {
t.skip(!t.production)
applyRandomTests(tc, arrayTransactions, 1800)
}
@@ -406,6 +401,13 @@ export const testRepeatGeneratingYarrayTests1800 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests10000 = tc => {
t.skip(!t.production)
applyRandomTests(tc, arrayTransactions, 10000)
}
/**
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests30000 = tc => {
t.skip(!t.production)
applyRandomTests(tc, arrayTransactions, 30000)
}

View File

@@ -347,8 +347,8 @@ const mapTransactions = [
/**
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests20 = tc => {
applyRandomTests(tc, mapTransactions, 8)
export const testRepeatGeneratingYmapTests10 = tc => {
applyRandomTests(tc, mapTransactions, 10)
}
/**
@@ -404,7 +404,6 @@ export const testRepeatGeneratingYmapTests300 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests400 = tc => {
t.skip(!t.production)
applyRandomTests(tc, mapTransactions, 400)
}
@@ -412,7 +411,6 @@ export const testRepeatGeneratingYmapTests400 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests500 = tc => {
t.skip(!t.production)
applyRandomTests(tc, mapTransactions, 500)
}
@@ -420,7 +418,6 @@ export const testRepeatGeneratingYmapTests500 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests600 = tc => {
t.skip(!t.production)
applyRandomTests(tc, mapTransactions, 600)
}
@@ -428,7 +425,6 @@ export const testRepeatGeneratingYmapTests600 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests1000 = tc => {
t.skip(!t.production)
applyRandomTests(tc, mapTransactions, 1000)
}
@@ -436,7 +432,6 @@ export const testRepeatGeneratingYmapTests1000 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests1800 = tc => {
t.skip(!t.production)
applyRandomTests(tc, mapTransactions, 1800)
}
@@ -444,6 +439,13 @@ export const testRepeatGeneratingYmapTests1800 = tc => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests10000 = tc => {
t.skip(!t.production)
applyRandomTests(tc, mapTransactions, 10000)
}
/**
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYmapTests100000 = tc => {
t.skip(!t.production)
applyRandomTests(tc, mapTransactions, 100000)
}