Skip to content

Commit

Permalink
chore: Merged with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Aug 16, 2023
2 parents c3246f9 + e831410 commit 1cf615d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 64 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:project-owner: redis-developer
:project-name: riot
:project-group: com.redis
:project-version: 3.1.4
:project-version: 3.1.5
:project-title: RIOT

image::src/media/banner.png[RIOT]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1.5-SNAPSHOT
3.1.5
56 changes: 0 additions & 56 deletions gradle.properties

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
import picocli.CommandLine.ParseResult;

@SuppressWarnings("unchecked")
public abstract class AbstractIntegrationTests extends AbstractRiotTests {
public abstract class AbstractIntegrationTests extends AbstractTests {

private final Logger log = LoggerFactory.getLogger(getClass());

Expand Down Expand Up @@ -177,7 +177,7 @@ protected void configureSubcommand(ParseResult sub) {

@Test
void fileApiImportJSON() throws UnexpectedInputException, ParseException, NonTransientResourceException, Exception {
FileImport command = new FileImport();
FileImport command = FileImport.builder().build();
Iterator<Map<String, Object>> iterator = command.read(AbstractIntegrationTests.BEERS_JSON_URL);
Assertions.assertTrue(iterator.hasNext());
Map<String, Object> beer1 = iterator.next();
Expand All @@ -192,8 +192,8 @@ void fileApiImportJSON() throws UnexpectedInputException, ParseException, NonTra

@Test
void fileApiImportCSV() throws UnexpectedInputException, ParseException, NonTransientResourceException, Exception {
FileImport command = new FileImport();
command.setFlatFileOptions(FlatFileOptions.builder().header(true).build());
FileImport command = FileImport.builder().flatFileOptions(FlatFileOptions.builder().header(true).build())
.build();
Iterator<Map<String, Object>> iterator = command.read("https://storage.googleapis.com/jrx/beers.csv");
Assertions.assertTrue(iterator.hasNext());
Map<String, Object> beer1 = iterator.next();
Expand All @@ -211,7 +211,7 @@ void fileApiFileExpansion() throws IOException {
Path temp = Files.createTempDirectory("fileExpansion");
Files.createFile(temp.resolve("file1.csv"));
Files.createFile(temp.resolve("file2.csv"));
FileImport command = new FileImport();
FileImport command = FileImport.builder().build();
List<ItemReader<Map<String, Object>>> readers = command.readers(temp.resolve("*.csv").toString())
.collect(Collectors.toList());
Assertions.assertEquals(2, readers.size());
Expand Down Expand Up @@ -434,6 +434,7 @@ private void configureExportCommand(CommandLine.ParseResult parseResult) {
}

@Test
@Disabled("Needs update")
void fileImportJSONElastic() throws Exception {
execute("file-import-json-elastic");
RedisKeyCommands<String, String> sync = connection.sync();
Expand Down Expand Up @@ -467,6 +468,7 @@ void fileExportJSON() throws Exception {

@SuppressWarnings("rawtypes")
@Test
@Disabled("Needs update")
void fileExportJSONGz() throws Exception {
Path file = tempFile("beers.json.gz");
execute("file-import-json");
Expand Down Expand Up @@ -577,7 +579,7 @@ void fileImportElasticJSON() throws Exception {
Assertions.assertEquals(2, sync.keys("elastic:*").size());
ObjectMapper mapper = new ObjectMapper();
String doc1 = sync.jsonGet("elastic:doc1");
String expected = "{\"_index\":\"test-index\",\"_type\":\"docs\",\"_id\":\"doc1\",\"_score\":1,\"_source\":{\"name\":\"ruan\",\"age\":30,\"articles\":[\"1\",\"3\"]}}";
String expected = "[{\"_index\":\"test-index\",\"_type\":\"docs\",\"_id\":\"doc1\",\"_score\":1,\"_source\":{\"name\":\"ruan\",\"age\":30,\"articles\":[\"1\",\"3\"]}}]";
Assertions.assertEquals(mapper.readTree(expected), mapper.readTree(doc1));
}

Expand Down Expand Up @@ -651,6 +653,7 @@ void fakerStream() throws Exception {
}

@Test
@Disabled("Needs update")
void fakerInfer() throws Exception {
String INDEX = "beerIdx";
String FIELD_ID = "id";
Expand Down

0 comments on commit 1cf615d

Please sign in to comment.