Skip to content

Commit

Permalink
Test: Add skip reasons/conditions to flaky/disabled tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smitpatel committed Dec 6, 2016
1 parent aff7bef commit 54f2266
Show file tree
Hide file tree
Showing 15 changed files with 108 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,32 @@ public virtual async Task ToListAsync_can_be_canceled()
}
}

// [ConditionalFact] // TODO: #6248
// public virtual async Task Mixed_sync_async_query()
// {
// using (var context = CreateContext())
// {
// var results
// = (await context.Customers
// .Select(c => new
// {
// c.CustomerID,
// Orders = context.Orders.Where(o => o.Customer.CustomerID == c.CustomerID)
// }).ToListAsync())
// .Select(x => new
// {
// Orders = x.Orders
// .GroupJoin(new[] { "ALFKI" }, y => x.CustomerID, y => y, (h, id) => new
// {
// h.Customer
// })
// })
// .ToList();
//
// Assert.Equal(546, results.SelectMany(r => r.Orders).ToList().Count);
// }
// }
[ConditionalFact] // TODO: See issue#7160
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "Test is flaky on CoreCLR.")]
public virtual async Task Mixed_sync_async_query()
{
using (var context = CreateContext())
{
var results
= (await context.Customers
.Select(c => new
{
c.CustomerID,
Orders = context.Orders.Where(o => o.Customer.CustomerID == c.CustomerID)
}).ToListAsync())
.Select(x => new
{
Orders = x.Orders
.GroupJoin(new[] { "ALFKI" }, y => x.CustomerID, y => y, (h, id) => new
{
h.Customer
})
})
.ToList();

Assert.Equal(546, results.SelectMany(r => r.Orders).ToList().Count);
}
}

[ConditionalFact]
public virtual async Task LoadAsync_should_track_results()
Expand Down Expand Up @@ -3322,12 +3323,13 @@ await AssertQuery<Customer>(
entryCount: 14);
}

[ConditionalFact]
[ConditionalFact] // TODO: See issue#7160
[FrameworkSkipCondition(RuntimeFrameworks.CoreCLR, SkipReason = "Test is flaky on CoreCLR.")]
public virtual async Task Except_nested()
{
await AssertQuery<Customer>(
cs => cs.Where(s => s.ContactTitle == "Owner").Except(cs.Where(s => s.City == "México D.F.")).Except(cs.Where(e => e.City == "Seattle")),
entryCount: 13);
cs => cs.Where(s => s.ContactTitle == "Owner").Except(cs.Where(s => s.City == "México D.F.")).Except(cs.Where(e => e.City == "Seattle")),
entryCount: 13);
}

[ConditionalFact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public virtual void Query_with_contains()
}
}

//[ConditionalFact] TODO: #7016
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7016
public virtual void Multiple_queries()
{
var query = EF.CompileQuery(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2184,8 +2184,7 @@ public virtual void Order_by_key_of_anonymous_type_projected_navigation_doesnt_g
verifyOrdered: true);
}

// issue #6618
////[ConditionalFact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See Issue#6618
public virtual void Optional_navigation_take_optional_navigation()
{
List<string> expected;
Expand Down Expand Up @@ -2261,7 +2260,7 @@ on l1.Id equals l3.Level2_Required_Id
);
}

//[ConditionalFact] TODO: See issue#6782
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#6782
public virtual void Where_predicate_on_optional_reference_navigation()
{
List<string> expected;
Expand Down Expand Up @@ -3106,8 +3105,7 @@ public virtual void Contains_with_subquery_optional_navigation_and_constant_item
(e, a) => Assert.Equal(e.Id, a.Id));
}

// Issue #6997
////[ConditionalFact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#6997
public virtual void Complex_query_with_optional_navigations_and_client_side_evaluation()
{
AssertQuery<Level1>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public abstract class F1FixtureBase<TTestStore>

protected virtual void OnModelCreating(ModelBuilder modelBuilder)
{
// TODO: Uncomment when complex types are supported
// TODO: Complex types are not supported. See issue#246
//builder.ComplexType<Location>();

modelBuilder.Entity<Chassis>(b => { b.HasKey(c => c.TeamId); });
Expand All @@ -25,7 +25,7 @@ protected virtual void OnModelCreating(ModelBuilder modelBuilder)
b.Property(e => e.Name).IsConcurrencyToken();
});

// TODO: Complex type
// TODO: Complex types are not supported. See issue#246
// .Property(c => c.StorageLocation);

modelBuilder.Ignore<Location>();
Expand All @@ -34,7 +34,7 @@ protected virtual void OnModelCreating(ModelBuilder modelBuilder)

modelBuilder.Entity<Gearbox>();

// TODO: Complex type
// TODO: Complex types are not supported. See issue#246
//builder
// .ComplexType<Location>()
// .Properties(ps =>
Expand All @@ -51,7 +51,7 @@ protected virtual void OnModelCreating(ModelBuilder modelBuilder)
.IsConcurrencyToken();
});

// TODO: Complex type
// TODO: Complex types are not supported. See issue#246
//builder
// .ComplexType<SponsorDetails>()
// .Properties(ps =>
Expand All @@ -70,10 +70,10 @@ protected virtual void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.Entity<TestDriver>();
modelBuilder.Entity<TitleSponsor>();

// TODO: Complex type
// TODO: Complex types are not supported. See issue#246
// .Property(t => t.Details);

// TODO: Sponsor * <-> * Team
// TODO: Sponsor * <-> * Team. Many-to-many relationships are not supported without CLR class for join table. See issue#1368
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,7 @@ where c.Location.Contains("Jacinto")
}
}

//[ConditionalFact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#4978
public virtual void Non_unicode_string_literals_is_used_for_non_unicode_column_with_concat()
{
using (var context = CreateContext())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Linq;
using Microsoft.EntityFrameworkCore.Metadata.Internal;
using Microsoft.EntityFrameworkCore.Specification.Tests.TestModels.InheritanceRelationships;
using Microsoft.EntityFrameworkCore.Specification.Tests.TestUtilities.Xunit;
using Xunit;

namespace Microsoft.EntityFrameworkCore.Specification.Tests
Expand Down Expand Up @@ -83,8 +84,7 @@ public virtual void Include_reference_with_inheritance1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_reference_with_inheritance2()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -144,8 +144,7 @@ public virtual void Include_reference_with_inheritance_with_filter1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_reference_with_inheritance_with_filter2()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -230,8 +229,7 @@ public virtual void Include_collection_with_inheritance1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_collection_with_inheritance2()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -268,8 +266,7 @@ public virtual void Include_collection_with_inheritance_with_filter1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_collection_with_inheritance_with_filter2()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -365,8 +362,7 @@ public virtual void Include_reference_with_inheritance_on_derived2()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_reference_with_inheritance_on_derived3()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -426,8 +422,7 @@ public virtual void Include_reference_with_inheritance_on_derived_with_filter2()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_reference_with_inheritance_on_derived_with_filter3()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -524,8 +519,7 @@ public virtual void Include_collection_with_inheritance_on_derived2()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_collection_with_inheritance_on_derived3()
{
using (var context = CreateContext())
Expand All @@ -537,8 +531,7 @@ public virtual void Include_collection_with_inheritance_on_derived3()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Include_collection_with_inheritance_on_derived4()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -574,8 +567,7 @@ public virtual void Nested_include_with_inheritance_reference_reference1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_reference_reference2()
{
using (var context = CreateContext())
Expand All @@ -599,8 +591,7 @@ public virtual void Nested_include_with_inheritance_reference_reference3()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_reference_reference4()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -636,8 +627,7 @@ public virtual void Nested_include_with_inheritance_reference_collection1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_reference_collection2()
{
using (var context = CreateContext())
Expand All @@ -661,8 +651,7 @@ public virtual void Nested_include_with_inheritance_reference_collection3()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_reference_collection4()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -699,8 +688,7 @@ public virtual void Nested_include_with_inheritance_collection_reference1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_collection_reference2()
{
using (var context = CreateContext())
Expand All @@ -712,8 +700,7 @@ public virtual void Nested_include_with_inheritance_collection_reference2()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_collection_reference3()
{
using (var context = CreateContext())
Expand All @@ -725,8 +712,7 @@ public virtual void Nested_include_with_inheritance_collection_reference3()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_collection_reference4()
{
using (var context = CreateContext())
Expand Down Expand Up @@ -763,8 +749,7 @@ public virtual void Nested_include_with_inheritance_collection_collection1()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_collection_collection2()
{
using (var context = CreateContext())
Expand All @@ -776,8 +761,7 @@ public virtual void Nested_include_with_inheritance_collection_collection2()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_collection_collection3()
{
using (var context = CreateContext())
Expand All @@ -789,8 +773,7 @@ public virtual void Nested_include_with_inheritance_collection_collection3()
}
}

// doesn't work for now
//[Fact]
[ConditionalFact(Skip = "Test does not pass.")] // TODO: See issue#7160
public virtual void Nested_include_with_inheritance_collection_collection4()
{
using (var context = CreateContext())
Expand Down
Loading

0 comments on commit 54f2266

Please sign in to comment.