Skip to content

[FME-4221] - New MetadataType #681

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

Open
wants to merge 4 commits into
base: FME-4220-events_baseline
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
2 changes: 2 additions & 0 deletions SemVer.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
10 changes: 10 additions & 0 deletions Split.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@
59FB7C3C2203795F00ECC96A /* LocalhostSplitsParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59FB7C3B2203795F00ECC96A /* LocalhostSplitsParser.swift */; };
59FB7C3E22037B9400ECC96A /* SpaceDelimitedLocalhostSplitsParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59FB7C3D22037B9400ECC96A /* SpaceDelimitedLocalhostSplitsParser.swift */; };
5B48D8172DEA2CED00351925 /* PrerequisitesMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF52DF52DE0B60300FEDAFE /* PrerequisitesMatcher.swift */; };
5B48D8192DF360D000351925 /* MetadataType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B48D8182DF360CB00351925 /* MetadataType.swift */; };
5B48D81A2DF360D000351925 /* MetadataType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B48D8182DF360CB00351925 /* MetadataType.swift */; };
5B48D81C2DF36C3F00351925 /* MetadataTypeTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B48D81B2DF36C3700351925 /* MetadataTypeTest.swift */; };
5B91B8392DDE4A3B000510F0 /* SplitDTOTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B91B8382DDE4A30000510F0 /* SplitDTOTests.swift */; };
5BF52DF72DE0B60700FEDAFE /* PrerequisitesMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF52DF52DE0B60300FEDAFE /* PrerequisitesMatcher.swift */; };
5BF52DF92DE4B8D400FEDAFE /* PrerequisitesMatcherTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BF52DF82DE4B8CA00FEDAFE /* PrerequisitesMatcherTest.swift */; };
Expand Down Expand Up @@ -1557,6 +1560,8 @@
59FB7C34220329B900ECC96A /* SplitFactoryBuilderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitFactoryBuilderTests.swift; sourceTree = "<group>"; };
59FB7C3B2203795F00ECC96A /* LocalhostSplitsParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalhostSplitsParser.swift; sourceTree = "<group>"; };
59FB7C3D22037B9400ECC96A /* SpaceDelimitedLocalhostSplitsParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpaceDelimitedLocalhostSplitsParser.swift; sourceTree = "<group>"; };
5B48D8182DF360CB00351925 /* MetadataType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetadataType.swift; sourceTree = "<group>"; };
5B48D81B2DF36C3700351925 /* MetadataTypeTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MetadataTypeTest.swift; sourceTree = "<group>"; };
5B91B8382DDE4A30000510F0 /* SplitDTOTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplitDTOTests.swift; sourceTree = "<group>"; };
5BF52DF52DE0B60300FEDAFE /* PrerequisitesMatcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrerequisitesMatcher.swift; sourceTree = "<group>"; };
5BF52DF82DE4B8CA00FEDAFE /* PrerequisitesMatcherTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrerequisitesMatcherTest.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2086,6 +2091,7 @@
31AA215C368D12E69FE80703 /* Streaming */ = {
isa = PBXGroup;
children = (
5B48D81B2DF36C3700351925 /* MetadataTypeTest.swift */,
31AA280A65C72BC92858422C /* SseClientTest.swift */,
595AD26024E5D48500A7B750 /* ReconnectBackoffCounterTest.swift */,
595AD20B24DDCB0E00A7B750 /* SseAuthenticatorTest.swift */,
Expand Down Expand Up @@ -2408,6 +2414,7 @@
3B6DEEBE20EA6AE20067435E /* Events */ = {
isa = PBXGroup;
children = (
5B48D8182DF360CB00351925 /* MetadataType.swift */,
3B6DEEC420EA6AE20067435E /* SplitEvent.swift */,
3B6DEEC520EA6AE20067435E /* SplitEventsManager.swift */,
9530FD7927F24306005027AA /* EventsManagerCoordinator.swift */,
Expand Down Expand Up @@ -4285,6 +4292,7 @@
598EDE84224CE2C4005D4762 /* SplitResult.swift in Sources */,
3B6DEF4120EA6AE50067435E /* DependencyMatcherData.swift in Sources */,
595AD24B24E30C0C00A7B750 /* Base64Utils.swift in Sources */,
5B48D8192DF360D000351925 /* MetadataType.swift in Sources */,
3B6DEF4520EA6AE50067435E /* Matcher.swift in Sources */,
59FB7C0D21F6099500ECC96A /* EventValidator.swift in Sources */,
95B341B026136B42002F57F6 /* KeyValueStorage.swift in Sources */,
Expand Down Expand Up @@ -4597,6 +4605,7 @@
95DE29532739A7AB00DB3EAD /* AttributesDaoTest.swift in Sources */,
95ABF50029379CCD006ED016 /* EventsSynchronizerStub.swift in Sources */,
955428E02568155B00331356 /* PersistentImpressionsStorageTest.swift in Sources */,
5B48D81C2DF36C3F00351925 /* MetadataTypeTest.swift in Sources */,
5912D152219A022000BC698C /* CsvHelper.swift in Sources */,
9505682026825B53001D7B10 /* ImpressionsCounterTest.swift in Sources */,
958F98722B1124EC001F35B3 /* SplitBgSynchronizerTests.swift in Sources */,
Expand Down Expand Up @@ -5027,6 +5036,7 @@
95B02D5F28D0BDC20030EC8B /* LessThanOrEqualToMatcher.swift in Sources */,
95B02D6028D0BDC20030EC8B /* MatchesStringMatcher.swift in Sources */,
952FA1312A31DCE400264AB5 /* SplitComponentCatalog.swift in Sources */,
5B48D81A2DF360D000351925 /* MetadataType.swift in Sources */,
95B02D6128D0BDC20030EC8B /* PartOfSetMatcher.swift in Sources */,
95B02D6228D0BDC20030EC8B /* StartWithMatcher.swift in Sources */,
95880CFB2AEFF177000498A0 /* FlagSetsValidator.swift in Sources */,
Expand Down
19 changes: 19 additions & 0 deletions Split/Events/MetadataType.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Created by Martin Cardozo on 06/06/2025

@objc enum MetadataType: Int {
case FLAGS_UPDATED
case FLAGS_KILLED
case SEGMENTS_UPDATED
case LARGE_SEGMENTS_UPDATED
case RULE_BASED_SEGMENTS_UPDATED

public func toString() -> String {
switch self {
case .FLAGS_UPDATED: "FLAGS_UPDATED"
case .FLAGS_KILLED: "FLAGS_KILLED"
case .SEGMENTS_UPDATED: "SEGMENTS_UPDATED"
case .LARGE_SEGMENTS_UPDATED: "LARGE_SEGMENTS_UPDATED"
case .RULE_BASED_SEGMENTS_UPDATED: "RULE_BASED_SEGMENTS_UPDATED"
}
}
}
2 changes: 2 additions & 0 deletions SplitPushManagerUT.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,8 @@
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MatcherTest",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
2 changes: 2 additions & 0 deletions SplitStreamingUT.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@
"LoggerTest\/testVerbose()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
14 changes: 14 additions & 0 deletions SplitTests/Streaming/MetadataTypeTest.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Created by Martin Cardozo on 06/06/2025

import XCTest
@testable import Split

class MetadataTypeTest: XCTestCase {
func testMetadataType() {
XCTAssertEqual(MetadataType.FLAGS_UPDATED.toString(), "FLAGS_UPDATED")
XCTAssertEqual(MetadataType.FLAGS_KILLED.toString(), "FLAGS_KILLED")
XCTAssertEqual(MetadataType.SEGMENTS_UPDATED.toString(), "SEGMENTS_UPDATED")
XCTAssertEqual(MetadataType.LARGE_SEGMENTS_UPDATED.toString(), "LARGE_SEGMENTS_UPDATED")
XCTAssertEqual(MetadataType.RULE_BASED_SEGMENTS_UPDATED.toString(), "RULE_BASED_SEGMENTS_UPDATED")
}
}
2 changes: 2 additions & 0 deletions SplitiOSHalf_1.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,8 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
2 changes: 2 additions & 0 deletions SplitiOSIntegration_1.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,8 @@
"LoggerTest\/testVerbose()",
"LoggerTest\/testWarning()",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
1 change: 1 addition & 0 deletions SplitiOSStreaming.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,7 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
2 changes: 2 additions & 0 deletions SplitiOSStreaming_1.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,8 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
2 changes: 2 additions & 0 deletions SplitiOSStreaming_2.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,8 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
1 change: 1 addition & 0 deletions SplitiOSUnit.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@
"LoggerTest\/testVerbose()",
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
2 changes: 2 additions & 0 deletions SplitiOSUnit_1.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,8 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationWithAttributes()",
Expand Down
1 change: 1 addition & 0 deletions SplitiOSUnit_2.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
"MultiClientEvaluationTest\/testEvaluationWithAttributes()",
"MultiClientEvaluationTest\/testImpressions()",
Expand Down
2 changes: 2 additions & 0 deletions SplitiOSUnit_3.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,8 @@
"LoggerTest\/testWarning()",
"MatcherEvalTests",
"MatcherEvalTests\/testEval()",
"MetadataTypeTest",
"MetadataTypeTest\/testMetadataType()",
"MultiClientEvaluationTest",
"MultiClientEvaluationTest\/testEvaluation()",
"MultiClientEvaluationTest\/testEvaluationFromCache()",
Expand Down
Loading