Skip to content

Commit

Permalink
increase the number of iteraions to 10 and increase the NSFS_RENAME_R…
Browse files Browse the repository at this point in the history
…ETRIES

Signed-off-by: shirady <[email protected]>
  • Loading branch information
shirady committed Sep 25, 2024
1 parent a534e27 commit 40d2c6a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
'use strict';

const path = require('path');
const config = require('../../../../config');
const P = require('../../../util/promise');
const fs_utils = require('../../../util/fs_utils');
const NamespaceFS = require('../../../sdk/namespace_fs');
Expand Down Expand Up @@ -40,13 +41,15 @@ const nsfs = new NamespaceFS({

const DUMMY_OBJECT_SDK = make_dummy_object_sdk(true);
describe('test versioning concurrency', () => {
const prior_value_of_nsfs_rename_retries = config.NSFS_RENAME_RETRIES;

beforeEach(async () => {
await fs_utils.create_fresh_path(tmp_fs_path);
});

afterEach(async () => {
await fs_utils.folder_delete(tmp_fs_path);
config.NSFS_RENAME_RETRIES = prior_value_of_nsfs_rename_retries;
});

it('multiple puts of the same key', async () => {
Expand Down Expand Up @@ -159,7 +162,8 @@ describe('test versioning concurrency', () => {
const successful_head_operations = [];
const failed_put_operations = [];
const failed_head_operations = [];
const number_of_iterations = 5; // by changing it to 10 it sometimes fails
const number_of_iterations = 10;
config.NSFS_RENAME_RETRIES = 40;
for (let i = 0; i < number_of_iterations; i++) {
const random_data = Buffer.from(String(i));
const body = buffer_utils.buffer_to_read_stream(random_data);
Expand Down

0 comments on commit 40d2c6a

Please sign in to comment.