File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
sdk/eventhub/event-hubs/test/internal Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import { delay } from "@azure/core-amqp";
3737import { isLatestPosition } from "../../src/eventPosition" ;
3838import { loggerForTest } from "../public/utils/logHelpers" ;
3939import { testWithServiceTypes } from "../public/utils/testWithServiceTypes" ;
40+ import { v4 } from "uuid" ;
4041
4142const should = chai . should ( ) ;
4243chai . use ( chaiAsPromised ) ;
@@ -699,6 +700,12 @@ testWithServiceTypes((serviceVersion) => {
699700 // ensure we have at least 2 partitions
700701 partitionIds . length . should . gte ( 2 ) ;
701702
703+ // work around initial state issue by filling partitions with at least one message
704+ for ( let i = 1 ; i < 100 ; i ++ ) {
705+ const filer = { body : "b" , messageId : v4 ( ) } ;
706+ await producerClient . sendBatch ( [ filer ] ) ;
707+ }
708+
702709 const { subscriptionEventHandler, startPosition } =
703710 await SubscriptionHandlerForTests . startingFromHere ( producerClient ) ;
704711
@@ -713,8 +720,6 @@ testWithServiceTypes((serviceVersion) => {
713720 }
714721 ) ;
715722
716- processor . start ( ) ;
717- processor . start ( ) ;
718723 processor . start ( ) ;
719724
720725 const expectedMessages = await sendOneMessagePerPartition ( partitionIds , producerClient ) ;
You can’t perform that action at this time.
0 commit comments