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();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long ramBytesUsed() {
|
||||
return model.ramBytesUsed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public float score(float[] modelFeatureValuesNormalized) {
|
||||
return model.score(modelFeatureValuesNormalized);
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue