Skip to content

[FME-6995] - Pausing - E2E Test 3 #708

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

Merged
merged 23 commits into from
Jul 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
d2bee23
Test added
MartinCardozo-SDK Jul 28, 2025
2f148be
Test added
MartinCardozo-SDK Jul 28, 2025
0897ca5
Test fixed
MartinCardozo-SDK Jul 28, 2025
adf788f
Tests fixed
MartinCardozo-SDK Jul 28, 2025
606c54b
Update MySegmentUpdateTest.swift
MartinCardozo-SDK Jul 29, 2025
4ff7ead
Update MySegmentUpdateTest.swift
MartinCardozo-SDK Jul 29, 2025
36aae93
Update MySegmentUpdateTest.swift
MartinCardozo-SDK Jul 29, 2025
b298f1a
Initial commit
MartinCardozo-SDK Jul 29, 2025
500b3b9
Typo
MartinCardozo-SDK Jul 29, 2025
7701ed5
Merge branch 'FME-6994-Pausing-E2E4' into FME-6993-Pausing-E2E5
MartinCardozo-SDK Jul 29, 2025
6e689a6
Test added
MartinCardozo-SDK Jul 29, 2025
27039db
Merge branch 'FME-4401-Pausing-E2E3' into FME-6994-Pausing-E2E4
MartinCardozo-SDK Jul 29, 2025
0f72887
Merge branch 'FME-6994-Pausing-E2E4' into FME-6993-Pausing-E2E5
MartinCardozo-SDK Jul 29, 2025
4c39693
Flags renamed
MartinCardozo-SDK Jul 29, 2025
9c2a6fa
Merge pull request #710 from splitio/FME-6993-Pausing-E2E5
MartinCardozo-SDK Jul 29, 2025
0f2ce61
Update MySegmentUpdateTest.swift
MartinCardozo-SDK Jul 30, 2025
90afd27
Merge pull request #709 from splitio/FME-6994-Pausing-E2E4
MartinCardozo-SDK Jul 30, 2025
4e07818
Merge branch 'FME-4396-baseline' into FME-4401-Pausing-E2E3
MartinCardozo-SDK Jul 31, 2025
cb43feb
Test fixed
MartinCardozo-SDK Jul 31, 2025
0669783
Merge branch 'FME-4396-baseline' into FME-4401-Pausing-E2E3
MartinCardozo-SDK Jul 31, 2025
b2e02d2
Typo
MartinCardozo-SDK Jul 31, 2025
2ea1ffd
Update MySegmentUpdateTest.swift
MartinCardozo-SDK Jul 31, 2025
b2497e7
Update SplitTests/Integration/Api/SplitIntegrationTest.swift
MartinCardozo-SDK Jul 31, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class DefaultRuleBasedSegmentsStorage: RuleBasedSegmentsStorage {
}

func loadLocal() {
segmentsInUse = persistentStorage.getSegmentsInUse()
let snapshot = persistentStorage.getSnapshot()
let active = snapshot.segments.filter { $0.status == .active }
let archived = snapshot.segments.filter { $0.status == .archived }
Expand Down
6 changes: 3 additions & 3 deletions Split/Storage/Splits/PersistentSplitsStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ protocol PersistentSplitsStorage {
func getSplitsSnapshot() -> SplitsSnapshot
func getChangeNumber() -> Int64
func getUpdateTimestamp() -> Int64
func getSegmentsInUse() -> Int64
func getSegmentsInUse() -> Int64?
func getAll() -> [Split]
func delete(splitNames: [String])
func clear()
Expand Down Expand Up @@ -64,8 +64,8 @@ class DefaultPersistentSplitsStorage: PersistentSplitsStorage {
return generalInfoDao.stringValue(info: .flagsSpec) ?? ""
}

func getSegmentsInUse() -> Int64 {
generalInfoDao.longValue(info: .segmentsInUse) ?? 0
func getSegmentsInUse() -> Int64? {
generalInfoDao.longValue(info: .segmentsInUse)
}

func update(bySetsFilter filter: SplitFilter?) {
Expand Down
5 changes: 3 additions & 2 deletions Split/Storage/Splits/SplitsStorage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DefaultSplitsStorage: SplitsStorage {
func loadLocal() {

// Ensure count of Flags with Segments (for optimization feature)
segmentsInUse = persistentStorage.getSegmentsInUse()
segmentsInUse = persistentStorage.getSegmentsInUse() ?? 0
defer { persistentStorage.update(segmentsInUse: segmentsInUse) }

let snapshot = persistentStorage.getSplitsSnapshot()
Expand Down Expand Up @@ -98,7 +98,7 @@ class DefaultSplitsStorage: SplitsStorage {
func update(splitChange: ProcessedSplitChange) -> Bool {

// Ensure count of Flags with Segments (for optimization feature)
segmentsInUse = persistentStorage.getSegmentsInUse()
segmentsInUse = persistentStorage.getSegmentsInUse() ?? 0
defer { persistentStorage.update(segmentsInUse: segmentsInUse) }

// Process
Expand Down Expand Up @@ -145,6 +145,7 @@ class DefaultSplitsStorage: SplitsStorage {
var splitsRemoved = false

for split in splits {

guard let splitName = split.name?.lowercased() else {
Logger.e("Invalid feature flag name received while updating feature flags")
continue
Expand Down
2 changes: 1 addition & 1 deletion SplitTests/Fake/Storage/PersistentSplitsStorageStub.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class PersistentSplitsStorageStub: PersistentSplitsStorage {
self.segmentsInUse = segmentsInUse
}

func getSegmentsInUse() -> Int64 {
func getSegmentsInUse() -> Int64? {
getSegmentsInUseCalled = true
return segmentsInUse
}
Expand Down
1 change: 0 additions & 1 deletion SplitTests/Helpers/SplitTestHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ class SplitTestHelper {
}

static func newSplit(name: String, trafficType: String) -> Split {

let splitJSONExample = """
{
"trafficTypeName":"\(trafficType)",
Expand Down
Loading
Loading