Skip to content

Commit

Permalink
Fix CI (#119)
Browse files Browse the repository at this point in the history
reduce write concurrency
  • Loading branch information
4eUeP authored Oct 8, 2023
1 parent d2f219e commit 858ff59
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/test/java/io/hstream/testing/PartitionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,15 @@ void testLargeConsumerGroup() throws Exception {
final String streamName = randStream(client, 20);
final String subscription = randSubscription(client, streamName);
io.hstream.Producer producer = client.newProducer().stream(streamName).build();
int count = 2000;
byte[] rRec = new byte[10];
var rids = new ArrayList<String>();
var writes = new ArrayList<CompletableFuture<String>>();
// NOTE: parallel should not be too large, otherwise the store server will
// reject the request. Especially for github ci environment.
int count = 2000;
for (int i = 0; i < count; i++) {
if (i % 50 == 0) {
Thread.sleep(10);
if (i % 20 == 0) {
Thread.sleep(500);
}
writes.add(
producer.write(Record.newBuilder().rawRecord(rRec).partitionKey("k_" + i % 10).build()));
Expand Down

0 comments on commit 858ff59

Please sign in to comment.