Skip to content

Commit

Permalink
test: Added wait
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Jun 16, 2023
1 parent 8e0e475 commit 7723837
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
import com.redis.lettucemod.search.TextField.PhoneticMatcher;
import com.redis.lettucemod.timeseries.MRangeOptions;
import com.redis.lettucemod.timeseries.RangeResult;
import com.redis.lettucemod.timeseries.Sample;
import com.redis.lettucemod.timeseries.TimeRange;
import com.redis.lettucemod.util.RedisModulesUtils;
import com.redis.riot.cli.common.GenerateOptions;
Expand Down Expand Up @@ -679,8 +678,7 @@ void fakerInfer() throws Exception {
@Test
void fakerTsAdd() throws Exception {
execute("faker-import-tsadd");
List<Sample> samples = connection.sync().tsRange("ts:gen", TimeRange.unbounded(), null);
Assertions.assertEquals(10, samples.size());
awaitUntil(() -> connection.sync().tsRange("ts:gen", TimeRange.unbounded()).size() == 10);
}

@Test
Expand All @@ -694,8 +692,8 @@ void fakerTsAddWithOptions() throws Exception {
@Test
void generateTypes() throws Exception {
execute("generate");
Assertions.assertEquals(Math.min(GenerateOptions.DEFAULT_COUNT,
GenerateOptions.DEFAULT_KEY_RANGE.getMax()), connection.sync().dbsize());
Assertions.assertEquals(Math.min(GenerateOptions.DEFAULT_COUNT, GenerateOptions.DEFAULT_KEY_RANGE.getMax()),
connection.sync().dbsize());
}

@Test
Expand Down

0 comments on commit 7723837

Please sign in to comment.