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

Fix test name uniqueness #8018

Merged
merged 3 commits into from
Nov 26, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import spock.lang.Specification

class EarlyFlakeDetectionSettingsSerializerTest extends Specification {

def "test serialization: #settings"() {
def "test serialization: #iterationIndex"() {
when:
Serializer s = new Serializer()
EarlyFlakeDetectionSettingsSerializer.serialize(s, settings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class PayloadTaggingExpansionForkedTest extends AbstractPayloadTaggingTest {
injectSysConfig(TracerConfig.TRACE_CLOUD_RESPONSE_PAYLOAD_TAGGING, "\$.MessageId,\$.SubscriptionArn,\$[*].phoneNumbers")
}

def "support various types, embedded JSON in string and binary format"() {
def "support various types, embedded JSON in string and binary format #expectedReqTag"() {
setup:
TEST_WRITER.clear()

Expand Down Expand Up @@ -261,7 +261,7 @@ class PayloadTaggingMaxDepthForkedTest extends AbstractPayloadTaggingTest {
injectSysConfig(TracerConfig.TRACE_CLOUD_PAYLOAD_TAGGING_MAX_DEPTH, "4")
}

def "generate tags up to the specified max depth"() {
def "generate tags up to the specified max depth #expectedReqTag"() {
setup:
TEST_WRITER.clear()

Expand Down Expand Up @@ -315,7 +315,7 @@ class PayloadTaggingMaxTagsForkedTest extends AbstractPayloadTaggingTest {
injectSysConfig(TracerConfig.TRACE_CLOUD_PAYLOAD_TAGGING_MAX_TAGS, "5")
}

def "generate tags up to the specified max number"() {
def "generate tags up to the specified max number #iterationIndex"() {
setup:
TEST_WRITER.clear()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Base64CallSiteTest extends AgentTestRunner {
injectSysConfig('dd.iast.enabled', 'true')
}

void 'test encode base 64'() {
void 'test encode base 64 #iterationIndex'() {
given:
final module = Mock(CodecModule)
InstrumentationBridge.registerIastModule(module)
Expand All @@ -33,7 +33,7 @@ class Base64CallSiteTest extends AgentTestRunner {
'encode' | ['Hello'.bytes, new Base64()]
}

void 'test decode base 64'() {
void 'test decode base 64 #iterationIndex'() {
given:
final module = Mock(CodecModule)
InstrumentationBridge.registerIastModule(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Json1ParserInstrumentationTest extends AgentTestRunner {
injectSysConfig("dd.iast.enabled", "true")
}

void 'test json parsing (tainted)'() {
void 'test json parsing #iterationIndex (tainted)'() {
given:
final source = new SourceImpl(origin: SourceTypes.REQUEST_BODY, name: 'body', value: JSON_STRING)
final module = Mock(PropagationModule)
Expand Down Expand Up @@ -45,7 +45,7 @@ class Json1ParserInstrumentationTest extends AgentTestRunner {
target << testSuite()
}

void 'test json parsing (not tainted)'() {
void 'test json parsing #iterationIndex (not tainted)'() {
given:
final module = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
InstrumentationBridge.clearIastModules()
}

void 'test getHeader'() {
void 'test getHeader #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -58,7 +58,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getHeaders'() {
void 'test getHeaders #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -79,7 +79,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getHeaderNames'() {
void 'test getHeaderNames #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -100,7 +100,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getParameter'() {
void 'test getParameter #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -120,7 +120,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getParameterValues'() {
void 'test getParameterValues #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -141,7 +141,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getParameterMap'() {
void 'test getParameterMap #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -168,7 +168,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
}


void 'test getParameterNames'() {
void 'test getParameterNames #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -189,7 +189,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getCookies'() {
void 'test getCookies #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -210,7 +210,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test that get headers does not fail when servlet related code fails'() {
void 'test that get headers does not fail when servlet related code fails #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand Down Expand Up @@ -238,7 +238,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test that get header names does not fail when servlet related code fails'() {
void 'test that get header names does not fail when servlet related code fails #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand Down Expand Up @@ -266,7 +266,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test get query string'() {
void 'test get query string #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -287,7 +287,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getInputStream'() {
void 'test getInputStream #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -308,7 +308,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getReader'() {
void 'test getReader #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -329,7 +329,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getRequestDispatcher'() {
void 'test getRequestDispatcher #iterationIndex'() {
setup:
final iastModule = Mock(UnvalidatedRedirectModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -351,7 +351,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuite()
}

void 'test getRequestURI'() {
void 'test getRequestURI #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -372,7 +372,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuiteCallSites()
}

void 'test getPathInfo'() {
void 'test getPathInfo #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -393,7 +393,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuiteCallSites()
}

void 'test getPathTranslated'() {
void 'test getPathTranslated #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -414,7 +414,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuiteCallSites()
}

void 'test getRequestURL'() {
void 'test getRequestURL #iterationIndex'() {
setup:
final iastModule = Mock(PropagationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand All @@ -435,7 +435,7 @@ class JakartaHttpServletRequestInstrumentationTest extends AgentTestRunner {
suite << testSuiteCallSites()
}

void 'test getSession'() {
void 'test getSession #iterationIndex'() {
setup:
final iastModule = Mock(ApplicationModule)
InstrumentationBridge.registerIastModule(iastModule)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class AgentTestRunnerTest extends AgentTestRunner {
noExceptionThrown()
}

def "excluded classes are not instrumented"() {
def "excluded classes are not instrumented #iterationIndex"() {
when:
runUnderTrace("parent") {
subject.run()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import static excludefilter.ExcludeFilterTestInstrumentation.RunnableExcludedExe

class ExcludeFilterForkedTest extends AgentTestRunner {

def "test ExcludeFilter"() {
def "test ExcludeFilter #runnable.class.name"() {
expect:
ExcludeFilter.exclude(RUNNABLE, runnable) == excluded

Expand Down
Loading