SOLR-13003: Fix WrapperModel method delegation.

This commit is contained in:
Andrzej Bialecki 2019-07-03 20:17:46 +02:00
parent b7090d9c25
commit 66812b2a67
2 changed files with 11 additions and 0 deletions

View File

@ -130,6 +130,11 @@ public abstract class WrapperModel extends AdapterModel {
return model.getAllFeatures();
}
@Override
public long ramBytesUsed() {
return model.ramBytesUsed();
}
@Override
public float score(float[] modelFeatureValuesNormalized) {
return model.score(modelFeatureValuesNormalized);

View File

@ -249,6 +249,12 @@ public class TestWrapperModel extends TestRerankBase {
++methodCount;
Mockito.verify(wrappedModel, Mockito.times(1)).getNorms();
// ramBytesUseD() : delegate
Mockito.reset(wrappedModel);
wrapperModel.ramBytesUsed();
++methodCount;
Mockito.verify(wrappedModel, Mockito.times(1)).ramBytesUsed();
// getFeatures : delegate
Mockito.reset(wrappedModel);
wrapperModel.getFeatures();