Skip to content

Commit 2ad95e1

Browse files
committed
test(synapse-sdk): remove internal batching regression test
1 parent c71be31 commit 2ad95e1

1 file changed

Lines changed: 0 additions & 33 deletions

File tree

packages/synapse-sdk/src/test/storage-upload.test.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import { setup } from 'iso-web/msw'
1212
import { HttpResponse, http } from 'msw'
1313
import { createWalletClient, http as viemHttp } from 'viem'
1414
import { privateKeyToAccount } from 'viem/accounts'
15-
import type { StorageContext } from '../storage/context.ts'
16-
import { PieceBatchingService } from '../storage/piece-batching.ts'
1715
import { Synapse } from '../synapse.ts'
1816
import type { PieceCID } from '../types.ts'
1917
import { SIZE_CONSTANTS } from '../utils/constants.ts'
@@ -182,37 +180,6 @@ describe('Storage Upload', () => {
182180
)
183181
})
184182

185-
it('should reject concurrent uploads cleanly when shared batch entry creation fails', async () => {
186-
const expected = new Error('entry creation failed')
187-
let rejectEntry: (error: Error) => void = () => undefined
188-
const entryFailure = new Promise<never>((_resolve, reject) => {
189-
rejectEntry = reject
190-
})
191-
const context = {
192-
dataSetId: 1n,
193-
provider: { id: 1n },
194-
getBatcherDataSet: () => entryFailure,
195-
} as unknown as StorageContext
196-
const batching = new PieceBatchingService(new Synapse({ client, source: null }), {})
197-
198-
const uploads = [
199-
batching.upload(context, { data: new Uint8Array(127) }).committed,
200-
batching.upload(context, { data: new Uint8Array(128) }).committed,
201-
]
202-
rejectEntry(expected)
203-
204-
const results = await Promise.allSettled(uploads)
205-
assert.deepEqual(
206-
results.map((result) => result.status),
207-
['rejected', 'rejected']
208-
)
209-
for (const result of results) {
210-
if (result.status === 'rejected') {
211-
assert.strictEqual(result.reason, expected)
212-
}
213-
}
214-
})
215-
216183
it('should expose flush for limiter-based batching', async () => {
217184
let addPiecesCalls = 0
218185
const txHash = '0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef123456'

0 commit comments

Comments
 (0)