Skip to content

Commit 3c91fd2

Browse files
committed
Fix tests
1 parent 9737c5a commit 3c91fd2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/client.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
const httpRequest = require('./http_utils');
20+
const httpUtils = require('./http_utils');
2121
const Pulsar = require('../index');
2222

2323
const baseUrl = 'http://localhost:8080';
@@ -74,7 +74,7 @@ const baseUrl = 'http://localhost:8080';
7474
const nonPartitionedTopicName = 'test-non-partitioned-topic';
7575
const nonPartitionedTopic = `persistent://public/default/${nonPartitionedTopicName}`;
7676
const nonPartitionedTopicAdminURL = `${baseUrl}/admin/v2/persistent/public/default/${nonPartitionedTopicName}`;
77-
const createNonPartitionedTopicRes = await httpRequest(
77+
const createNonPartitionedTopicRes = await httpUtils.request(
7878
nonPartitionedTopicAdminURL, {
7979
headers: {
8080
'Content-Type': 'application/json',
@@ -91,7 +91,7 @@ const baseUrl = 'http://localhost:8080';
9191
const partitionedTopicName = 'test-partitioned-topic-1';
9292
const partitionedTopic = `persistent://public/default/${partitionedTopicName}`;
9393
const partitionedTopicAdminURL = `${baseUrl}/admin/v2/persistent/public/default/${partitionedTopicName}/partitions`;
94-
const createPartitionedTopicRes = await httpRequest(
94+
const createPartitionedTopicRes = await httpUtils.request(
9595
partitionedTopicAdminURL, {
9696
headers: {
9797
'Content-Type': 'text/plain',
@@ -110,9 +110,9 @@ const baseUrl = 'http://localhost:8080';
110110
'persistent://public/default/test-partitioned-topic-1-partition-3',
111111
]);
112112

113-
const deleteNonPartitionedTopicRes = await httpRequest(nonPartitionedTopicAdminURL, { method: 'DELETE' });
113+
const deleteNonPartitionedTopicRes = await httpUtils.request(nonPartitionedTopicAdminURL, { method: 'DELETE' });
114114
expect(deleteNonPartitionedTopicRes.statusCode).toBe(204);
115-
const deletePartitionedTopicRes = await httpRequest(partitionedTopicAdminURL, { method: 'DELETE' });
115+
const deletePartitionedTopicRes = await httpUtils.request(partitionedTopicAdminURL, { method: 'DELETE' });
116116
expect(deletePartitionedTopicRes.statusCode).toBe(204);
117117

118118
await client.close();

0 commit comments

Comments
 (0)