Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggling E2E tests #726

Open
wants to merge 3 commits into
base: SDKS-9151
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions src/androidTest/assets/split_changes_imp_toggle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"splits": [
{
"trafficTypeName": "user",
"name": "tracked",
"trafficAllocation": 100,
"trafficAllocationSeed": -285565213,
"seed": -1992295819,
"status": "ACTIVE",
"killed": false,
"defaultTreatment": "off",
"changeNumber": 1506703262916,
"algo": 2,
"trackImpressions": true,
"conditions": [
{
"conditionType": "ROLLOUT",
"matcherGroup": {
"combiner": "AND",
"matchers": [
{
"keySelector": {
"trafficType": "client",
"attribute": null
},
"matcherType": "IN_SEGMENT",
"negate": false,
"userDefinedSegmentMatcherData": {
"segmentName": "new_segment"
},
"whitelistMatcherData": null,
"unaryNumericMatcherData": null,
"betweenMatcherData": null,
"booleanMatcherData": null,
"dependencyMatcherData": null,
"stringMatcherData": null
}
]
},
"partitions": [
{
"treatment": "on",
"size": 0
},
{
"treatment": "off",
"size": 0
},
{
"treatment": "free",
"size": 100
},
{
"treatment": "conta",
"size": 0
}
],
"label": "in segment new_segment"
}
]
},
{
"trafficTypeName": "user",
"name": "not_tracked",
"trafficAllocation": 100,
"trafficAllocationSeed": -285565213,
"seed": -1992295819,
"status": "ACTIVE",
"killed": false,
"defaultTreatment": "off",
"changeNumber": 1506703262916,
"algo": 2,
"trackImpressions": false,
"conditions": [
{
"conditionType": "ROLLOUT",
"matcherGroup": {
"combiner": "AND",
"matchers": [
{
"keySelector": {
"trafficType": "client",
"attribute": null
},
"matcherType": "IN_SEGMENT",
"negate": false,
"userDefinedSegmentMatcherData": {
"segmentName": "new_segment"
},
"whitelistMatcherData": null,
"unaryNumericMatcherData": null,
"betweenMatcherData": null,
"booleanMatcherData": null,
"dependencyMatcherData": null,
"stringMatcherData": null
}
]
},
"partitions": [
{
"treatment": "on",
"size": 0
},
{
"treatment": "off",
"size": 0
},
{
"treatment": "free",
"size": 100
},
{
"treatment": "conta",
"size": 0
}
],
"label": "in segment new_segment"
}
]
}
],
"since": 1506703262916,
"till": 1506703262916
}
5 changes: 4 additions & 1 deletion src/androidTest/java/helper/DatabaseHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ public static boolean removeDatabaseFile(String name) {
}

public static SplitRoomDatabase getTestDatabase(Context context) {
return Room.inMemoryDatabaseBuilder(context, SplitRoomDatabase.class)
SplitRoomDatabase database = Room.inMemoryDatabaseBuilder(context, SplitRoomDatabase.class)
.fallbackToDestructiveMigration()
.allowMainThreadQueries()
.build();

database.clearAllTables();
return database;
}
}
4 changes: 4 additions & 0 deletions src/androidTest/java/helper/IntegrationHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -442,5 +442,9 @@ public interface StreamingResponseClosure {
public static class ServicePath {
public static final String MEMBERSHIPS = "memberships";
public static final String SPLIT_CHANGES = "splitChanges";
public static final String EVENTS = "events";
public static final String UNIQUE_KEYS = "keys/cs";
public static final String COUNT = "testImpressions/count";
public static final String IMPRESSIONS = "testImpressions/bulk";
}
}
Loading
Loading