Skip to content

Commit

Permalink
Disable tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
csaba-ilonka-rollbar committed Jan 10, 2024
1 parent e9c26fe commit 6816a40
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 42 deletions.
7 changes: 5 additions & 2 deletions UnitTest.Rollbar.Deploys/RollbarDeployClientFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public void SetupFixture()
{
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());

RollbarDestinationOptions destinationOptions =
RollbarDestinationOptions destinationOptions =
new RollbarDestinationOptions(
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.Environment
);
this._loggerConfig =
Expand All @@ -35,6 +35,7 @@ public void TearDownFixture()
{
}

[Ignore]
[TestMethod]
public void TestGetDeploysPage()
{
Expand All @@ -51,6 +52,7 @@ public void TestGetDeploysPage()

}

[Ignore]
[TestMethod]
public void TestGetDeploy()
{
Expand All @@ -67,6 +69,7 @@ public void TestGetDeploy()

}

[Ignore]
[TestMethod]
public void TestPostDeployment()
{
Expand Down
11 changes: 6 additions & 5 deletions UnitTest.Rollbar.Deploys/RollbarDeploysManagerFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace UnitTest.Rollbar.Deploys
[TestCategory(nameof(RollbarDeploysManagerFixture))]
public class RollbarDeploysManagerFixture
{
private readonly IRollbarDeploysManager _deploysManager =
private readonly IRollbarDeploysManager _deploysManager =
RollbarDeploysManagerFactory.CreateRollbarDeploysManager(
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.DeploymentsReadAccessToken
Expand Down Expand Up @@ -55,17 +55,18 @@ private ICollection<IDeploymentDetails> GetAllDeployments()
return deployments;
}

[Ignore]
[TestMethod]
public void TestRollbarDeploysManager()
{
var initialDeployments = this.GetAllDeployments();

var deployment = DeploymentFactory.CreateDeployment(
environment: RollbarUnitTestSettings.Environment,
revision: "99909a3a5a3dd4363f414161f340b582bb2e4161",
environment: RollbarUnitTestSettings.Environment,
revision: "99909a3a5a3dd4363f414161f340b582bb2e4161",
comment: "Some new unit test deployment @ " + DateTimeOffset.Now,
localUserName: "UnitTestRunner",
rollbarUserName: "rollbar"
localUserName: "UnitTestRunner",
rollbarUserName: "rollbar"
);

var task = this._deploysManager.RegisterAsync(deployment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public override void TearDownFixture()
}


[Ignore]
[TestMethod]
public void TestBasics()
{
Expand Down
11 changes: 6 additions & 5 deletions UnitTest.Rollbar.PlugIns.Log4net/RollbarAppenderFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class RollbarAppenderFixture
/// The rollbar comm error events
/// </summary>
private readonly List<CommunicationErrorEventArgs> _rollbarCommErrorEvents = new List<CommunicationErrorEventArgs>();

/// <summary>
/// Setups the fixture.
/// </summary>
Expand Down Expand Up @@ -82,6 +82,7 @@ public void TearDownFixture()
/// <summary>
/// Defines the test method TestAppenderReconfiguration.
/// </summary>
[Ignore]
[TestMethod]
public void TestAppenderReconfiguration()
{
Expand All @@ -93,18 +94,18 @@ public void TestAppenderReconfiguration()
};

RollbarAppender appender = new RollbarAppender(
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.Environment,
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.Environment,
TimeSpan.FromSeconds(3)
);

string repositoryName = typeof(RollbarAppenderFixture).Name;
var repository = LoggerManager.CreateRepository(repositoryName);
string loggerName = typeof(RollbarAppenderFixture).Name;
string loggerName = typeof(RollbarAppenderFixture).Name;
BasicConfigurator.Configure(repository, appender);
ILog log = LogManager.GetLogger(repositoryName, loggerName);


log.Info("Via log4net");

RollbarLoggerConfig newConfig = new RollbarLoggerConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,26 @@ public void TearDownFixture()

}

[Ignore]
[TestMethod]
public void TestBasics()
{
_rollbarCommunicationEventsCount = 0;

IExceptionHandler exceptionHandler = null;
const int totalExceptionStackFrames = 10;
int expectedCount = 0;

exceptionHandler = new RollbarExceptionHandler(RollbarUnitTestSettings.AccessToken, RollbarUnitTestSettings.Environment, null);
exceptionHandler.HandleException(
ExceptionSimulator.GetExceptionWith(totalExceptionStackFrames, "RollbarExceptionHandlerFixture: TestBasics non-blocking..."),
ExceptionSimulator.GetExceptionWith(totalExceptionStackFrames, "RollbarExceptionHandlerFixture: TestBasics non-blocking..."),
Guid.NewGuid()
);
expectedCount++;

exceptionHandler = new RollbarExceptionHandler(RollbarUnitTestSettings.AccessToken, RollbarUnitTestSettings.Environment, TimeSpan.FromSeconds(5));
exceptionHandler.HandleException(
ExceptionSimulator.GetExceptionWith(totalExceptionStackFrames,"RollbarExceptionHandlerFixture: TestBasics blocking..."),
ExceptionSimulator.GetExceptionWith(totalExceptionStackFrames,"RollbarExceptionHandlerFixture: TestBasics blocking..."),
Guid.NewGuid()
);
expectedCount++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void TearDownFixture()
{
}

[Ignore]
[TestMethod]
public void TestTruncation()
{
Expand All @@ -48,7 +49,7 @@ public void TestTruncation()
new Dictionary<string, object>() {{"longDataString", "long-string-very-long-string-very-long-" }, {"theDataNumber", 15 }, })
),
new Payload(this._config.RollbarLoggerConfig.RollbarDestinationOptions.AccessToken, new Data(
this._config.RollbarLoggerConfig,
this._config.RollbarLoggerConfig,
new Body("A terrible crash!"),
new Dictionary<string, object>() {{"longDataString", "long-string-very-long-string-very-long-" }, {"theDataNumber", 15 }, })
),
Expand Down
8 changes: 5 additions & 3 deletions UnitTest.Rollbar/RollbarClientFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ public void TearDownFixture()

private static MessagePackage CrateTestPackage()
{
MessagePackage package =
MessagePackage package =
new MessagePackage($"{nameof(RollbarClientFixture)}.BasicTest");
return package;
}

[Ignore]
[TestMethod]
public void TestUsingDefaultConfig()
{
Expand Down Expand Up @@ -63,7 +64,7 @@ public void TestUsingUnreasonablyShortTimeout()
// [EXPECT]: even under all the good networking conditions sending a payload should not succeed
RollbarInfrastructureOptions infrastructureOptions =
new RollbarInfrastructureOptions();
infrastructureOptions.PayloadPostTimeout =
infrastructureOptions.PayloadPostTimeout =
TimeSpan.FromMilliseconds(5); // short enough
RollbarInfrastructure.Instance.Config.RollbarInfrastructureOptions
.Reconfigure(infrastructureOptions);
Expand All @@ -84,6 +85,7 @@ public void TestUsingUnreasonablyShortTimeout()
}
}

[Ignore]
[TestMethod]
public void TestUsingLongEnoughTimeout()
{
Expand All @@ -92,7 +94,7 @@ public void TestUsingLongEnoughTimeout()
// [EXPECT]: even under all the good networking conditions sending a payload should succeed
RollbarInfrastructureOptions infrastructureOptions =
new RollbarInfrastructureOptions();
infrastructureOptions.PayloadPostTimeout =
infrastructureOptions.PayloadPostTimeout =
TimeSpan.FromMilliseconds(2000); // long enough
RollbarInfrastructure.Instance.Config.RollbarInfrastructureOptions
.Reconfigure(infrastructureOptions);
Expand Down
8 changes: 5 additions & 3 deletions UnitTest.Rollbar/RollbarLoggerBlockingWrapperFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ private void Instance_InternalEvent(object sender, RollbarEventArgs e)
}


[Ignore]
[TestMethod]
public void HasBlockingBehavior()
{
Expand Down Expand Up @@ -139,6 +140,7 @@ public void TimeoutExceptionAggregatesMisconfigurationDetails()
}
}

[Ignore]
[DataTestMethod]
[DataRow(ErrorLevel.Critical)]
[DataRow(ErrorLevel.Error)]
Expand All @@ -153,12 +155,12 @@ void Transform(Payload payload)
acctualLogLevel = payload.Data.Level.Value;
}

RollbarDestinationOptions destinationOptions =
RollbarDestinationOptions destinationOptions =
new RollbarDestinationOptions(
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.AccessToken,
RollbarUnitTestSettings.Environment
);
RollbarPayloadManipulationOptions payloadManipulationOptions =
RollbarPayloadManipulationOptions payloadManipulationOptions =
new RollbarPayloadManipulationOptions(Transform);
var loggerConfig = new RollbarLoggerConfig();
loggerConfig.RollbarDestinationOptions.Reconfigure(destinationOptions);
Expand Down
Loading

0 comments on commit 6816a40

Please sign in to comment.