Skip to content

Commit

Permalink
Fix flaky Spring tests due to schema resolution (#1735)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasTu authored Aug 9, 2023
1 parent 54fcb15 commit f0e2790
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions config/nohttp/allowlist.lines
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@

// XMLNS
^http://www.spockframework.org/spring$

// Spring schemas from the Spring library classpath
^http://www.springframework.org/schema/beans/spring-beans-2.5.xsd$
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<bean id="myService1" class="org.spockframework.spring.Service1">
<constructor-arg ref="myService2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spock="http://www.spockframework.org/spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.spockframework.org/spring https://www.spockframework.org/spring/spock.xsd">

<spock:mock id="serviceMock" class="org.spockframework.spring.IService1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">


<bean id="service2Request" class="org.spockframework.spring.xml.SpockMockFactoryBean" scope="request">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<bean id="service1request" class="org.spockframework.spring.xml.SpockMockFactoryBean" scope="request">
<constructor-arg value="org.spockframework.spring.IService1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
<property name="url" value="jdbc:h2:mem:"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<bean id="dataSource" class="org.springframework.jdbc.datasource.SingleConnectionDataSource">
<property name="url" value="jdbc:h2:mem:"/>
Expand Down

0 comments on commit f0e2790

Please sign in to comment.