Skip to content

Commit 6faa636

Browse files
authored
FIX: return builtin CuVSProvider when mock is null in internalClusterTests (#138155) (#138215)
In #137126 we refactored GPUSupport to use static initialization. Some IT tests were fixed to support this, but we did not notice that GPUIndexIT needed attention too. GPUIndexIT uses the real (builtin) CuVSProvider, and thus does not need to provide a mock. This PR changes the Test CuVSProvider to "bypass" itself when we do no specify a mock, so that in those cases we use the builtin provider.
1 parent 9cd5d9a commit 6faa636

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

x-pack/plugin/gpu/src/internalClusterTest/java/org/elasticsearch/plugin/gpu/TestCuVSServiceProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public class TestCuVSServiceProvider extends CuVSServiceProvider {
2525

2626
@Override
2727
public CuVSProvider get(CuVSProvider builtin) {
28+
if (mockedGPUInfoProvider == null) {
29+
return builtin;
30+
}
2831
return new CuVSProviderDelegate(builtin) {
2932
@Override
3033
public GPUInfoProvider gpuInfoProvider() {

0 commit comments

Comments
 (0)