1717 * under the License.
1818 */
1919
20- const httpRequest = require ( './http_utils' ) ;
20+ const httpUtils = require ( './http_utils' ) ;
2121const Pulsar = require ( '../index' ) ;
2222
2323const 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