-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
85 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...java/com/netflix/hollow/core/read/engine/AbstractHollowTypeDataElementsSplitJoinTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.netflix.hollow.core.read.engine; | ||
|
||
import com.netflix.hollow.core.AbstractStateEngineTest; | ||
import com.netflix.hollow.core.schema.HollowObjectSchema; | ||
import com.netflix.hollow.core.write.HollowObjectTypeWriteState; | ||
import com.netflix.hollow.core.write.HollowObjectWriteRecord; | ||
import org.junit.Before; | ||
|
||
public class AbstractHollowTypeDataElementsSplitJoinTest extends AbstractStateEngineTest { | ||
protected HollowObjectSchema schema; | ||
|
||
@Before | ||
public void setUp() { | ||
schema = new HollowObjectSchema("TestObject", 4); | ||
schema.addField("longField", HollowObjectSchema.FieldType.LONG); | ||
schema.addField("stringField", HollowObjectSchema.FieldType.STRING); | ||
schema.addField("intField", HollowObjectSchema.FieldType.INT); | ||
schema.addField("doubleField", HollowObjectSchema.FieldType.DOUBLE); | ||
|
||
super.setUp(); | ||
} | ||
|
||
@Override | ||
protected void initializeTypeStates() { | ||
writeStateEngine.addTypeState(new HollowObjectTypeWriteState(schema)); | ||
} | ||
|
||
protected void populateWriteStateEngine(int numRecords) { | ||
initWriteStateEngine(); | ||
HollowObjectWriteRecord rec = new HollowObjectWriteRecord(schema); | ||
for(int i=0;i<numRecords;i++) { | ||
rec.reset(); | ||
rec.setLong("longField", i); | ||
rec.setString("stringField", "Value" + i); | ||
rec.setInt("intField", i); | ||
rec.setDouble("doubleField", i); | ||
|
||
writeStateEngine.add("TestObject", rec); | ||
} | ||
} | ||
|
||
protected void populateWriteStateEngine(int[] recordIds) { | ||
initWriteStateEngine(); | ||
HollowObjectWriteRecord rec = new HollowObjectWriteRecord(schema); | ||
for(int recordId : recordIds) { | ||
rec.reset(); | ||
rec.setLong("longField", recordId); | ||
rec.setString("stringField", "Value" + recordId); | ||
rec.setInt("intField", recordId); | ||
rec.setDouble("doubleField", recordId); | ||
|
||
writeStateEngine.add("TestObject", rec); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
...m/netflix/hollow/core/read/engine/set/AbstractHollowSetTypeDataElementsSplitJoinTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.netflix.hollow.core.read.engine.set; | ||
|
||
public class AbstractHollowSetTypeDataElementsSplitJoinTest { //extends AbstractHollowTypeDataElementsSplitJoinTest { | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
.../java/com/netflix/hollow/core/read/engine/set/HollowSetTypeDataElementsSplitJoinTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.netflix.hollow.core.read.engine.set; | ||
|
||
public class HollowSetTypeDataElementsSplitJoinTest { //} extends AbstractHollowSetTypeDataElementsSplitJoinTest { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters