Skip to content

Commit

Permalink
Fix non-deterministic behavior in IgniteStoreMetadataAnalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhanwangZhou committed Nov 14, 2024
1 parent be0df1a commit 9651eb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Properties;
Expand Down Expand Up @@ -64,6 +65,7 @@ public List<String> getTablesNames() throws GoraException {
} catch (SQLException ex) {
throw new GoraException(ex);
}
Collections.sort(tabs);
return tabs;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class TestIgniteStore extends DataStoreTestBase {
public void igniteStoreMetadataAnalyzerTest() throws Exception {
DataStoreMetadataAnalyzer createAnalyzer = DataStoreMetadataFactory.createAnalyzer(DataStoreTestBase.testDriver.getConfiguration());
Assert.assertEquals("Ignite Store Metadata Type", "IGNITE", createAnalyzer.getType());
Assert.assertTrue("Ignite Store Metadata Table Names", createAnalyzer.getTablesNames().equals(Lists.newArrayList("WEBPAGE", "EMPLOYEE")));
Assert.assertTrue("Ignite Store Metadata Table Names", createAnalyzer.getTablesNames().equals(Lists.newArrayList("EMPLOYEE", "WEBPAGE")));
IgniteTableMetadata tableInfo = (IgniteTableMetadata) createAnalyzer.getTableInfo("EMPLOYEE");
Assert.assertEquals("Ignite Store Metadata Table Primary Key Column", "PKSSN", tableInfo.getPrimaryKey());
Assert.assertEquals("Ignite Store Metadata Table Primary Key Type", "VARCHAR", tableInfo.getPrimaryKeyType());
Expand Down

0 comments on commit 9651eb5

Please sign in to comment.