mirror of https://github.com/apache/lucene.git
SOLR-13003: Fix WrapperModel method delegation.
This commit is contained in:
parent
b7090d9c25
commit
66812b2a67
|
@ -130,6 +130,11 @@ public abstract class WrapperModel extends AdapterModel {
|
||||||
return model.getAllFeatures();
|
return model.getAllFeatures();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long ramBytesUsed() {
|
||||||
|
return model.ramBytesUsed();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float score(float[] modelFeatureValuesNormalized) {
|
public float score(float[] modelFeatureValuesNormalized) {
|
||||||
return model.score(modelFeatureValuesNormalized);
|
return model.score(modelFeatureValuesNormalized);
|
||||||
|
|
|
@ -249,6 +249,12 @@ public class TestWrapperModel extends TestRerankBase {
|
||||||
++methodCount;
|
++methodCount;
|
||||||
Mockito.verify(wrappedModel, Mockito.times(1)).getNorms();
|
Mockito.verify(wrappedModel, Mockito.times(1)).getNorms();
|
||||||
|
|
||||||
|
// ramBytesUseD() : delegate
|
||||||
|
Mockito.reset(wrappedModel);
|
||||||
|
wrapperModel.ramBytesUsed();
|
||||||
|
++methodCount;
|
||||||
|
Mockito.verify(wrappedModel, Mockito.times(1)).ramBytesUsed();
|
||||||
|
|
||||||
// getFeatures : delegate
|
// getFeatures : delegate
|
||||||
Mockito.reset(wrappedModel);
|
Mockito.reset(wrappedModel);
|
||||||
wrapperModel.getFeatures();
|
wrapperModel.getFeatures();
|
||||||
|
|
Loading…
Reference in New Issue