title: Why does my Oracle DataSource have a replay error only when unit testing?
body: <p>My Spring Boot 1.5.17 (Spring 4.3.20) server works fine with bootRun or when deployed.</p>
  
  <p>However, I have an Oracle DataSource that fails <strong>only when unit-testing</strong>:</p>
  
  <blockquote>
    <p>java.lang.AssertionError: Server is sending a non-null replay context
    but our replayModes=[]</p>
  </blockquote>
  
  <p>A Google Search for this error doesn't have exact results.</p>
  
  <p>I am able to unit-test with a different Oracle database.</p>
  
  <p>I get the error with a full Application testing context</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(
          webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
          classes = { TestingUserConfiguration.class, Application.class }
  )
  </code></pre>
  
  <p>As well as just the single DataSource config and Service</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(classes = {
          MyDbConfig.class,
          MyService.class
  })
  </code></pre>
  
  <p>Both <code>oracle.jdbc.pool.OracleDataSource</code> and <code>oracle.jdbc.replay.OracleConnectionPoolDataSourceImpl</code> have the error.
  UCP makes no difference.</p>
  
  <p><code>OracleConnectionPoolDataSourceImpl</code> has a different error:</p>
  
  <blockquote>
    <p>java.sql.SQLException: Unsupported feature</p>
  </blockquote>
  
  <p>Tried upgrading from OJDBC 12.2 to 2018.3, no difference.</p>
  
  <p>Has anyone seen this error before?
  Any ideas on why it only appears with Spring unit tests?</p>