-
-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Dependencies #1378
Update Dependencies #1378
Changes from all commits
6fed5f6
feb4435
aeb1c1c
d51b725
e94f879
631b578
94ba508
75cfa35
179563d
bd59569
2a1587e
1ea5e98
ceb6dd5
c061218
abbf9e7
e74c901
65b1996
314e9f6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<RunSettings> | ||
<RunConfiguration> | ||
<!--Used in conjunction with ActiveIssueAttribute to skip tests with known issues--> | ||
<TestCaseFilter>category!=failing</TestCaseFilter> | ||
</RunConfiguration> | ||
</RunSettings> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -198,17 +198,18 @@ public void GifDecoder_DegenerateMemoryRequest_ShouldTranslateTo_ImageFormatExce | |
[Theory] | ||
[WithFile(TestImages.Gif.Giphy, PixelTypes.Rgba32)] | ||
[WithFile(TestImages.Gif.Kumin, PixelTypes.Rgba32)] | ||
public void GifDecoder_CanDecode_WithLimitedAllocatorBufferCapacity<TPixel>(TestImageProvider<TPixel> provider) | ||
where TPixel : unmanaged, IPixel<TPixel> | ||
public void GifDecoder_CanDecode_WithLimitedAllocatorBufferCapacity( | ||
TestImageProvider<Rgba32> provider) | ||
{ | ||
static void RunTest(string providerDump, string nonContiguousBuffersStr) | ||
{ | ||
TestImageProvider<TPixel> provider = BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump); | ||
TestImageProvider<Rgba32> provider | ||
= BasicSerializer.Deserialize<TestImageProvider<Rgba32>>(providerDump); | ||
|
||
provider.LimitAllocatorBufferCapacity().InPixelsSqrt(100); | ||
|
||
using Image<TPixel> image = provider.GetImage(GifDecoder); | ||
image.DebugSave(provider); | ||
using Image<Rgba32> image = provider.GetImage(GifDecoder); | ||
image.DebugSave(provider, nonContiguousBuffersStr); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch |
||
image.CompareToOriginal(provider); | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -129,10 +129,10 @@ public async Task DecodeAsnc_DegenerateMemoryRequest_ShouldTranslateTo_ImageForm | |
[Theory] | ||
[InlineData(TestImages.Jpeg.Baseline.Jpeg420Small, 0)] | ||
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 1)] | ||
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 10)] | ||
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 15)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test was flaky on NET Core 2.1, this seemed to make it less so. |
||
[InlineData(TestImages.Jpeg.Issues.ExifGetString750Transform, 30)] | ||
[InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 1)] | ||
[InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 10)] | ||
[InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 15)] | ||
[InlineData(TestImages.Jpeg.Issues.BadRstProgressive518, 30)] | ||
public async Task Decode_IsCancellable(string fileName, int cancellationDelayMs) | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,21 +138,10 @@ public void Serialize(IXunitSerializationInfo info) | |
public void BokehBlurFilterProcessor<TPixel>(TestImageProvider<TPixel> provider, BokehBlurInfo value) | ||
where TPixel : unmanaged, IPixel<TPixel> | ||
{ | ||
static void RunTest(string providerDump, string infoDump) | ||
{ | ||
TestImageProvider<TPixel> provider = | ||
BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump); | ||
BokehBlurInfo value = BasicSerializer.Deserialize<BokehBlurInfo>(infoDump); | ||
|
||
provider.RunValidatingProcessorTest( | ||
x => x.BokehBlur(value.Radius, value.Components, value.Gamma), | ||
testOutputDetails: value.ToString(), | ||
appendPixelTypeToFileName: false); | ||
} | ||
|
||
RemoteExecutor | ||
.Invoke(RunTest, BasicSerializer.Serialize(provider), BasicSerializer.Serialize(value)) | ||
.Dispose(); | ||
provider.RunValidatingProcessorTest( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This, and below tests were remote executed to reduce memory pressure, and the chance of OOM-s, especially on x86. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They seem to be ok now. As I recall it uses less memory than it did originally. Haven't seen any failures in the last few test runs due to this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Definitely rock solid. Multiple test runs with zero issues. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok for now then, but if we'll see OOM-s after introducing new 32bit targets, this is a good place to get back. Note that we were getting OOM-s not because of a specific test but rather because of reaching a critical mass of memory intentse-tests. I also pushed some Jpeg tests out-process together with the Bokeh ones back in the past. The price is execution time OFC. Testing image-processing is hard :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Preach! |
||
x => x.BokehBlur(value.Radius, value.Components, value.Gamma), | ||
testOutputDetails: value.ToString(), | ||
appendPixelTypeToFileName: false); | ||
} | ||
|
||
[Theory] | ||
|
@@ -164,45 +153,25 @@ static void RunTest(string providerDump, string infoDump) | |
public void BokehBlurFilterProcessor_WorksWithAllPixelTypes<TPixel>(TestImageProvider<TPixel> provider) | ||
where TPixel : unmanaged, IPixel<TPixel> | ||
{ | ||
static void RunTest(string providerDump) | ||
{ | ||
TestImageProvider<TPixel> provider = | ||
BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump); | ||
provider.RunValidatingProcessorTest( | ||
provider.RunValidatingProcessorTest( | ||
x => x.BokehBlur(8, 2, 3), | ||
appendSourceFileOrDescription: false); | ||
} | ||
|
||
RemoteExecutor | ||
.Invoke(RunTest, BasicSerializer.Serialize(provider)) | ||
.Dispose(); | ||
} | ||
|
||
[Theory] | ||
[WithFileCollection(nameof(TestFiles), nameof(BokehBlurValues), PixelTypes.Rgba32)] | ||
public void BokehBlurFilterProcessor_Bounded<TPixel>(TestImageProvider<TPixel> provider, BokehBlurInfo value) | ||
where TPixel : unmanaged, IPixel<TPixel> | ||
{ | ||
static void RunTest(string providerDump, string infoDump) | ||
{ | ||
TestImageProvider<TPixel> provider = | ||
BasicSerializer.Deserialize<TestImageProvider<TPixel>>(providerDump); | ||
BokehBlurInfo value = BasicSerializer.Deserialize<BokehBlurInfo>(infoDump); | ||
|
||
provider.RunValidatingProcessorTest( | ||
x => | ||
{ | ||
Size size = x.GetCurrentSize(); | ||
var bounds = new Rectangle(10, 10, size.Width / 2, size.Height / 2); | ||
x.BokehBlur(value.Radius, value.Components, value.Gamma, bounds); | ||
}, | ||
testOutputDetails: value.ToString(), | ||
appendPixelTypeToFileName: false); | ||
} | ||
|
||
RemoteExecutor | ||
.Invoke(RunTest, BasicSerializer.Serialize(provider), BasicSerializer.Serialize(value)) | ||
.Dispose(); | ||
provider.RunValidatingProcessorTest( | ||
x => | ||
{ | ||
Size size = x.GetCurrentSize(); | ||
var bounds = new Rectangle(10, 10, size.Width / 2, size.Height / 2); | ||
x.BokehBlur(value.Radius, value.Components, value.Gamma, bounds); | ||
}, | ||
testOutputDetails: value.ToString(), | ||
appendPixelTypeToFileName: false); | ||
} | ||
|
||
[Theory] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,7 +170,10 @@ private static void PrepareRemoteExecutor() | |
} | ||
|
||
string testProjectConfigPath = TestAssemblyFile.FullName + ".config"; | ||
File.Copy(testProjectConfigPath, remoteExecutorConfigPath); | ||
if (File.Exists(testProjectConfigPath)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file only exists if there are binding redirects. |
||
{ | ||
File.Copy(testProjectConfigPath, remoteExecutorConfigPath); | ||
} | ||
|
||
if (Is64BitProcess) | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we adding this only because of
ActiveIssueAttribute
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I see it's not a trivial feature because of the optional
TargetFrameworkMonikers
parameter. Cool 👍There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it's pretty nifty. Some cool other attributes available also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not actually needed now but keeping it as it's far too useful!