我已升级到Spring Boot 2.1,并且其中一项测试开始失败:
renderCluster = (cluster, onPress) => {
const pointCount = cluster.pointCount,
coordinate = cluster.coordinate,
clusterId = cluster.clusterId
const clusteringEngine = this.map.getClusteringEngine(),
clusteredPoints = clusteringEngine.getLeaves(clusterId, 100)
let map = this.map.getMapRef()
console.log(9,map.props.onRegionChangeComplete())
const bgColor = ()=>{
if(pointCount<10)
return 'purple';
if(pointCount<99)
return 'green';
if(pointCount<999)
return 'red';
return 'blue';
};
const radio = String(pointCount).length * 12 + 5;
return (
<Marker coordinate={coordinate} onPress={onPress}>
<View style={{backgroundColor: bgColor(), width: radio, height: radio, borderRadius: radio/2, padding: 4, alignItems: "center", justifyContent:"center", borderWidth: 1, borderColor: "#FFF"}}>
<Text style={{color: "#FFF", fontSize: 12, fontWeight: "400"}}>
{pointCount}
</Text>
</View>
</Marker>
)
}
renderMarker = (data) => <Marker image={CONFIG.info.marker} key={data.id || Math.random()} coordinate={data.location} />
render() {
return (
<ClusteredMapView
style={{ flex: 1 }}
data={this.state.data}
initialRegion={INIT_REGION}
ref={(r) => { this.map = r }}
renderMarker={this.renderMarker}
renderCluster={this.renderCluster} />
)
}
除非我将CacheTestConfiguration明确添加到classes数组,否则此配置不起作用。
我在做什么错了?